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

Negative integer powers error with numpy 1.12 #1187

Closed
matthew-brett opened this Issue Mar 7, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@matthew-brett
Member

matthew-brett commented Mar 7, 2017

Testing with numpy 1.12, multiple errors of form:

======================================================================
ERROR: dipy.reconst.tests.test_mapmri.test_mapmri_signal_fitting
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/matthew-brett/dipy/venv/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/build/matthew-brett/dipy/venv/lib/python2.7/site-packages/dipy/reconst/tests/test_mapmri.py", line 184, in test_mapmri_signal_fitting
    anisotropic_scaling=False)
  File "/home/travis/build/matthew-brett/dipy/venv/lib/python2.7/site-packages/dipy/reconst/mapmri.py", line 272, in __init__
    radial_order, 1.)
  File "/home/travis/build/matthew-brett/dipy/venv/lib/python2.7/site-packages/dipy/reconst/mapmri.py", line 1699, in mapmri_isotropic_laplacian_reg_matrix
    gamma(1 / 2.0 + ji + l) / gamma(ji)
ValueError: Integers to negative integer powers are not allowed.

https://travis-ci.org/matthew-brett/dipy/jobs/208424940

These are because of a recent change in numpy - see https://docs.scipy.org/doc/numpy/release.html#power-and-raise-errors-for-integer-to-negative-integer-powers

Maybe the calculation should be in floating point rather than integers or something?

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Mar 7, 2017

Cross ref #1186 - where we start to use the latest numpy for tests.

@arokem

This comment has been minimized.

Member

arokem commented Mar 29, 2017

I believe this was resolved in #1186

@arokem arokem closed this Mar 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment