Skip to content
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

Fix dask.array.random 2023.2.1 #3103

Merged

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Feb 25, 2023

Dask 2023.2.1 refactor the code to generate random numbers and now follows the syntax introduced in numpy 1.17 - see #3049 and https://numpy.org/doc/stable/reference/random/new-or-different.html#new-or-different for more details.

Progress of the PR

  • Deprecate use of numpy.random.RandomState and start to use np.random.default_rng in test suite instead,,
  • Bump scipy minimum requirement to 1.4.0 to support np.random.default_rng,
  • update test depending on numpy.random.RandomState,
  • [n/a] update docstring (if appropriate),
  • [n/a] update user guide (if appropriate),
  • add an changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • Check formatting changelog entry in the readthedocs doc build of this PR (link in github checks)
  • add tests,
  • ready for review.

@codecov
Copy link

codecov bot commented Feb 25, 2023

Codecov Report

Patch coverage: 90.00% and project coverage change: -0.01 ⚠️

Comparison is base (cf21c21) 81.00% compared to head (7fcafad) 81.00%.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           RELEASE_next_patch    #3103      +/-   ##
======================================================
- Coverage               81.00%   81.00%   -0.01%     
======================================================
  Files                     209      209              
  Lines                   32753    32770      +17     
  Branches                 7237     7242       +5     
======================================================
+ Hits                    26533    26545      +12     
- Misses                   4466     4470       +4     
- Partials                 1754     1755       +1     
Impacted Files Coverage Δ
hyperspy/signal.py 77.08% <ø> (ø)
hyperspy/signal_tools.py 73.83% <66.66%> (+0.03%) ⬆️
hyperspy/misc/math_tools.py 79.22% <95.65%> (-3.04%) ⬇️
hyperspy/samfire.py 65.54% <100.00%> (ø)

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ericpre
Copy link
Member Author

ericpre commented Mar 7, 2023

@CSSFrancis, @jlaehne, @francisco-dlp, can one of you review this PR?

@CSSFrancis
Copy link
Member

I have a bit of free time and can do it now!

Copy link
Member

@CSSFrancis CSSFrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like all pretty straight forward changes. The only thing that I thought might be worth doing extra is adding a comment where you change a couple of the tests incase someone is testing with an older version of numpy and those tests start to fail. It might give some idea of why that is the case.

hyperspy/tests/signals/test_eels.py Show resolved Hide resolved
hyperspy/misc/math_tools.py Outdated Show resolved Hide resolved
hyperspy/misc/math_tools.py Outdated Show resolved Hide resolved
hyperspy/misc/math_tools.py Outdated Show resolved Hide resolved
Co-authored-by: Carter Francis <csfrancis@wisc.edu>
@CSSFrancis CSSFrancis merged commit 05ec4c5 into hyperspy:RELEASE_next_patch Mar 9, 2023
@ericpre ericpre deleted the fix_dask_random_2023.2.1 branch March 11, 2023 19:07
@ericpre ericpre added this to the v1.7.4 milestone Mar 12, 2023
@ericpre ericpre mentioned this pull request Mar 12, 2023
57 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants