-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed test #187
fixed test #187
Conversation
@@ -48,11 +48,11 @@ def test__make_signal_mask(self): | |||
|
|||
def test_remove_spikes(self): | |||
s = CLSpectrum(np.ones((2, 3, 30))) | |||
np.random.seed(1) | |||
np.random.seed(np.random.randint(666666)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, np.random.randint
is still using the legacy random generator: https://numpy.org/doc/stable/reference/random/generated/numpy.random.randint.html. Would it make sense to use the new generator?
The legacy generator is not deprecated but it will most likely be at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what I understood the np.random.seed statement has no effect as the following add_gaussian_noise from hyperspy does not take it into account and applies its own seed using the generator object.
I updated the tests to remove this line
Codecov ReportPatch and project coverage have no change.
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #187 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 554 554
=========================================
Hits 554 554 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Does |
From what I see in the code, it mostly allows to choose whether it is done in place or not. (I just discover now that the test is still flaky) |
Indeed, apart from the additional @jordiferrero, you contributed this function, what was the original motivation behind it? If we are just changing defaults of an existing function, it does not really make sense to keep it up. |
Fixes the failing test in #185