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

BUG: Fix Numpy .random.random_integer deprecation warning. #1705

Conversation

jhlegarreta
Copy link
Contributor

Fix Numpy .random.random_integer deprecation warning. Fixes:

DeprecationWarning: This function is deprecated. Please call randint(1, 20
+ 1) instead

and similar warnings.

@jhlegarreta
Copy link
Contributor Author

The reported test failure is related to #1698.

@arokem
Copy link
Contributor

arokem commented Dec 26, 2018

I don't think it is. The error here: https://travis-ci.org/nipy/dipy/jobs/471993180#L4223 is new and looks like it's probably related to changes you made in test_mrf.py.

@jhlegarreta jhlegarreta force-pushed the FixNumpyRandomIntergersMethodDeprecationWarnings branch from 8344e39 to 2346013 Compare December 26, 2018 23:36
@jhlegarreta
Copy link
Contributor Author

True, the additional error was caused by changes in the commit. Having a closer look at the function documentation, the lower bound is defined differently when high is omitted (0 for numpy.random.randint vs. 1 for numpy.random.random_integers), and numpy.random.randint uses half-open interval. Let's see if changes in commit 2346013 fix the difference.

@jhlegarreta
Copy link
Contributor Author

Looks like the only error remaining now is that related to #1698.

Fix Numpy `.random.random_integer` deprecation warning. Fixes:
```
DeprecationWarning: This function is deprecated. Please call randint(1, 20
+ 1) instead
```

and similar warnings.
@jhlegarreta jhlegarreta force-pushed the FixNumpyRandomIntergersMethodDeprecationWarnings branch from 2346013 to f56afdc Compare December 30, 2018 01:02
@codecov-io
Copy link

codecov-io commented Dec 30, 2018

Codecov Report

Merging #1705 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1705      +/-   ##
==========================================
- Coverage   84.26%   84.24%   -0.03%     
==========================================
  Files         114      114              
  Lines       13556    13556              
  Branches     2139     2139              
==========================================
- Hits        11423    11420       -3     
- Misses       1637     1640       +3     
  Partials      496      496
Impacted Files Coverage Δ
dipy/reconst/forecast.py 90.15% <0%> (-2.08%) ⬇️
dipy/core/graph.py 75% <0%> (+1.19%) ⬆️

@jhlegarreta
Copy link
Contributor Author

Ready to be merged then !

@skoudoro skoudoro merged commit 911af34 into dipy:master Dec 31, 2018
@skoudoro
Copy link
Member

Thank you @jhlegarreta! And happy new year! 🎉 😄

@jhlegarreta jhlegarreta deleted the FixNumpyRandomIntergersMethodDeprecationWarnings branch January 1, 2019 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants