diff --git a/sdgym/synthesizers/independent.py b/sdgym/synthesizers/independent.py index b49ffbce..4ce5319d 100644 --- a/sdgym/synthesizers/independent.py +++ b/sdgym/synthesizers/independent.py @@ -45,10 +45,10 @@ def _sample_from_synthesizer(self, synthesizer, n_samples): for name, column in transformed.items(): kind = column.dtype.kind if kind == 'O': - values = column.sample(self.length, replace=True).to_numpy() + values = column.sample(n_samples, replace=True).to_numpy() else: model = gm_models.get(name) - values = model.sample(self.length)[0].ravel().clip(column.min(), column.max()) + values = model.sample(n_samples)[0].ravel().clip(column.min(), column.max()) sampled[name] = values diff --git a/sdgym/synthesizers/uniform.py b/sdgym/synthesizers/uniform.py index adc1cecc..8f5f4fcd 100644 --- a/sdgym/synthesizers/uniform.py +++ b/sdgym/synthesizers/uniform.py @@ -49,11 +49,11 @@ def _sample_from_synthesizer(self, synthesizer, n_samples): for name, column in transformed.items(): kind = column.dtype.kind if kind == 'i': - values = np.random.randint(column.min(), column.max() + 1, size=self.length) + values = np.random.randint(column.min(), column.max() + 1, size=n_samples) elif kind in ['O', 'b']: values = np.random.choice(column.unique(), size=self.length) else: - values = np.random.uniform(column.min(), column.max(), size=self.length) + values = np.random.uniform(column.min(), column.max(), size=n_samples) sampled[name] = values