From 5456e034f4e62de7ee1d4a5d2d5c790e1621c903 Mon Sep 17 00:00:00 2001 From: Simon Foreman Date: Wed, 13 Mar 2024 16:14:22 -0700 Subject: [PATCH 1/2] fix(GaussianNoise): fix bug in noise generation --- draco/synthesis/noise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draco/synthesis/noise.py b/draco/synthesis/noise.py index 4ae9e1365..345431c91 100644 --- a/draco/synthesis/noise.py +++ b/draco/synthesis/noise.py @@ -211,7 +211,7 @@ def process(self, data): if self.add_noise: noise = random.complex_normal( - (nfreq, nprod, ntime), + size=(nfreq, nprod, ntime), scale=std[np.newaxis, :, np.newaxis], rng=self.rng, ) From 2076a6a2b4f36ce600a57b1a9c8052e7c46b37c6 Mon Sep 17 00:00:00 2001 From: Simon Foreman Date: Wed, 13 Mar 2024 19:37:18 -0700 Subject: [PATCH 2/2] refactor(ContainerBase): fix spec check for consistency with ruff guidelines --- draco/core/containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draco/core/containers.py b/draco/core/containers.py index d004463fc..d3fcd3307 100644 --- a/draco/core/containers.py +++ b/draco/core/containers.py @@ -219,7 +219,7 @@ def __init__(self, *args, **kwargs): # Iterate over datasets and initialise any that specify it if not skip_datasets: for name, spec in self.dataset_spec.items(): - if "initialise" in spec and spec["initialise"]: + if spec.get("initialise"): self.add_dataset(name) # Copy over datasets that have compatible axes