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

commented Dec 25, 2018

Fix Numpy .random.random_integer deprecation warning. Fixes:

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

and similar warnings.

@jhlegarreta

This comment has been minimized.

Copy link
Contributor Author

commented Dec 25, 2018

The reported test failure is related to #1698.

@arokem

This comment has been minimized.

Copy link
Member

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 jhlegarreta:FixNumpyRandomIntergersMethodDeprecationWarnings branch from 8344e39 to 2346013 Dec 26, 2018

@jhlegarreta

This comment has been minimized.

Copy link
Contributor Author

commented Dec 26, 2018

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

This comment has been minimized.

Copy link
Contributor Author

commented Dec 27, 2018

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

BUG: Fix Numpy `.random.random_integer` deprecation warning.
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 jhlegarreta:FixNumpyRandomIntergersMethodDeprecationWarnings branch from 2346013 to f56afdc Dec 30, 2018

@codecov-io

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor Author

commented Dec 31, 2018

Ready to be merged then !

@skoudoro skoudoro merged commit 911af34 into nipy:master Dec 31, 2018

4 checks passed

codecov/patch Coverage not affected when comparing 58393aa...f56afdc
Details
codecov/project 84.24% (-0.03%) compared to 58393aa
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@skoudoro

This comment has been minimized.

Copy link
Member

commented Dec 31, 2018

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

@jhlegarreta jhlegarreta deleted the jhlegarreta:FixNumpyRandomIntergersMethodDeprecationWarnings branch Jan 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.