From be59dbe4413610f0212ded90dbde63b4da234e4d Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 19 Jun 2024 18:30:06 -0600 Subject: [PATCH] add more personality to the test --- src/spikeinterface/preprocessing/tests/test_scaling.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/spikeinterface/preprocessing/tests/test_scaling.py b/src/spikeinterface/preprocessing/tests/test_scaling.py index 39fe3d0ddc..6dbc66591f 100644 --- a/src/spikeinterface/preprocessing/tests/test_scaling.py +++ b/src/spikeinterface/preprocessing/tests/test_scaling.py @@ -15,10 +15,11 @@ def test_scale_to_uv(): sampling_frequency=sampling_frequency, ) - gains = np.ones(shape=(num_channels)) - offsets = np.zeros(shape=(num_channels)) - recording.set_channel_gains(gains) # Random gains - recording.set_channel_offsets(offsets) # Random offsets + rng = np.random.default_rng(0) + gains = rng.random(size=(num_channels)).astype(np.float32) + offsets = rng.random(size=(num_channels)).astype(np.float32) + recording.set_channel_gains(gains) + recording.set_channel_offsets(offsets) # Apply the preprocessor scaled_recording = ScaleTouV(recording=recording)