matthew-brett / transforms3d

3 dimensional spatial transformations
http://matthew-brett.github.io/transforms3d/
Other
465 stars 83 forks source link

Compatibility with numpy 1.11 #9

Closed ignatenkobrain closed 8 years ago

ignatenkobrain commented 8 years ago
======================================================================
ERROR: transforms3d.tests.test_zooms_shears.test_striu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/transforms3d-0.2.1/transforms3d/tests/test_zooms_shears.py", line 61, in test_striu
    M = tss.striu2mat(shears)
  File "/builddir/build/BUILD/transforms3d-0.2.1/transforms3d/shears.py", line 73, in striu2mat
    inds = np.triu(np.ones((N,N)), 1).astype(bool)
  File "/usr/lib/python2.7/site-packages/numpy/core/numeric.py", line 190, in ones
    a = empty(shape, dtype, order)
TypeError: 'float' object cannot be interpreted as an index
----------------------------------------------------------------------
matthew-brett commented 8 years ago

Thanks for the report.

I just tried this with the numpy 1.11 rc1, and got no errors - just a warning:

transforms3d.tests.test_zooms_shears.test_striu ... /Users/mb312/.virtualenvs/test/lib/python2.7/site-packages/numpy/core/numeric.py:190: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  a = empty(shape, dtype, order)

What numpy version (commit?) are you using to test?

matthew-brett commented 8 years ago

Fix for warning in #10

matthew-brett commented 8 years ago

Closed by #10