FS#32094 - [python2-numpy] ndindex and nditer bug - fixed upstream
Attached to Project:
Arch Linux
Opened by Daan van Rossum (drrossum) - Friday, 19 October 2012, 17:44 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 13 March 2013, 02:09 GMT
Opened by Daan van Rossum (drrossum) - Friday, 19 October 2012, 17:44 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 13 March 2013, 02:09 GMT
|
Details
Description:
This Numpy version 1.7.0b2 seems to have a bug that causes scipy.interpolate to fail: -- File "/usr/lib/python2.7/site-packages/scipy/interpolate/interpolate.py", line 835, in spleval res[sl] = _fitpack._bspleval(xx,xj,cvals[sl],k,deriv) IndexError: too many indices -- A google search reveals that this bug was fixed upstream: http://mail.scipy.org/pipermail/scipy-user/2012-September/033254.html https://github.com/numpy/numpy/pull/445 I can't recompile version 1.6.2 from ABS with the recent python updates, so I'll pull from git until a new version is released. |
This task depends upon
--
File "/usr/lib/python2.7/site-packages/scipy/interpolate/interpolate.py", line 829, in spleval
for index in np.ndindex(*sh):
File "/usr/lib/python2.7/site-packages/numpy/lib/index_tricks.py", line 536, in __init__
x = as_strided(_nx.zeros(1), shape=shape, strides=_nx.zeros_like(shape))
File "/usr/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 28, in as_strided
return np.asarray(DummyArray(interface, base=x))
File "/usr/lib/python2.7/site-packages/numpy/core/numeric.py", line 324, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: __array_interface__ shape must be at least size 1
--
Perhaps this is a scipy bug after all... I'll try to recompile scipy and see if that solves the issue.
So I will have to go back and get numpy 1.6.2 to compile...
SO THIS IS NOT YET FIXED UPSTREAM
The problem with compiling 1.6.2 occured for python3.3. Who cares...
`ValueError: __array_interface__ shape must be at least size 1`
a google search lead me here:
https://github.com/numpy/numpy/pull/444
It said that:
"But without the shape information, it still gives the error:
ValueError: Missing __array_interface__ shape"
I don't really understand it,It looks like it's still a problem.
"ValueError: __array_interface__ shape must be at least size 1"
I'll stick to numpy 1.6.2 until the bug is fixed upstream.
The new matplotlib 1.2.0 package now does not work out of the box. In order to get consistency you have to recompile the mpl 1.2.0 on your own python2 stack.
I attached a patch for scipy's interpolate.py. It works around numpy ndindex no longer allowing empty tuple expansion *().
Apply the patch like this:
patch /usr/lib/python2.7/site-packages/scipy/interpolate/interpolate.py ~/patch