[SciPy-Dev] scipy test errors

Skipper Seabold jsseabold@gmail....
Fri Dec 21 09:19:50 CST 2012


On Fri, Dec 21, 2012 at 4:39 AM, Pauli Virtanen <pav@iki.fi> wrote:
> Skipper Seabold <jsseabold <at> gmail.com> writes:
> [clip]
>> http://projects.scipy.org/scipy/ticket/1796
>>
>> But I installed master numpy/scipy yesterday on a new system, and I'm
>> also experience a large number of errors. Not all the same as listed
>> on the ticket.
>>
>> FAILED (KNOWNFAIL=17, SKIP=37, errors=48)
>>
>> Test output attached.
>
> I think all these are due to changes made in Numpy master,
> with an older Numpy version (e.g. 1.6.2) all of them should go away.
>

That's what I figured. I submitted a PR for the indexing with a float.
Not sure why the deprecation warnings raised errors though. Don't
recall seeing this before. Maybe some configuration that I've
overlooked?

I was curious if the problems coming from as_strided were a numpy
problem. Similarly, I get these errors with numpy 1.7.0b2

======================================================================
ERROR: test_interpolate.TestInterp1D.test_bounds
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 257, in test_bounds
    self._bounds_check(kind)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 224, in _bounds_check
    extrap10(11.2),
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 419, in __call__
    y_new = self._call(x_new)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 395, in _call_spline
    result = spleval(self._spline,x_new.ravel())
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 858, in spleval
    res[sl] = _fitpack._bspleval(xx,xj,cvals[sl],k,deriv)
IndexError: too many indices

======================================================================
ERROR: test_interpolate.TestInterp1D.test_complex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 349, in test_complex
    self._check_complex(np.complex64, kind)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 337, in _check_complex
    assert_array_almost_equal(y[:-1], c(x)[:-1])
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 419, in __call__
    y_new = self._call(x_new)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 395, in _call_spline
    result = spleval(self._spline,x_new.ravel())
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 855, in spleval
    res[sl].real = _fitpack._bspleval(xx,xj,cvals.real[sl],k,deriv)
IndexError: too many indices

======================================================================
ERROR: Check the actual implementation of spline interpolation.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 177, in test_cubic
    interp10(self.x10),
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 419, in __call__
    y_new = self._call(x_new)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 395, in _call_spline
    result = spleval(self._spline,x_new.ravel())
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 858, in spleval
    res[sl] = _fitpack._bspleval(xx,xj,cvals[sl],k,deriv)
IndexError: too many indices

======================================================================
ERROR: test_interpolate.TestInterp1D.test_nd
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 327, in test_nd
    self._nd_check_interp(kind)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_interpolate.py",
line 267, in _nd_check_interp
    interp10(np.array([[3., 5.], [2., 7.]])),
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 419, in __call__
    y_new = self._call(x_new)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 395, in _call_spline
    result = spleval(self._spline,x_new.ravel())
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 858, in spleval
    res[sl] = _fitpack._bspleval(xx,xj,cvals[sl],k,deriv)
IndexError: too many indices

======================================================================
ERROR: test_ndgriddata.TestGriddata.test_1d
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_ndgriddata.py",
line 73, in test_1d
    assert_allclose(griddata(x, y, x, method=method), y,
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/ndgriddata.py",
line 178, in griddata
    return ip(xi)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 419, in __call__
    y_new = self._call(x_new)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 395, in _call_spline
    result = spleval(self._spline,x_new.ravel())
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 858, in spleval
    res[sl] = _fitpack._bspleval(xx,xj,cvals[sl],k,deriv)
IndexError: too many indices

======================================================================
ERROR: test_ndgriddata.TestGriddata.test_1d_unsorted
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/tests/test_ndgriddata.py",
line 85, in test_1d_unsorted
    assert_allclose(griddata(x, y, x, method=method), y,
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/ndgriddata.py",
line 178, in griddata
    return ip(xi)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 419, in __call__
    y_new = self._call(x_new)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 395, in _call_spline
    result = spleval(self._spline,x_new.ravel())
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py",
line 858, in spleval
    res[sl] = _fitpack._bspleval(xx,xj,cvals[sl],k,deriv)
IndexError: too many indices

======================================================================
ERROR: test_kdtree.test_vectorization.test_vectorized_query
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/tests/test_kdtree.py",
line 159, in test_vectorized_query
    d, i = self.kdtree.query(np.zeros((2,4,3)))
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/kdtree.py",
line 434, in query
    for c in np.ndindex(retshape):
  File "/usr/local/lib/python2.7/dist-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/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py",
line 28, in as_strided
    return np.asarray(DummyArray(interface, base=x))
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py",
line 320, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: negative dimensions are not allowed

======================================================================
ERROR: test_kdtree.test_vectorization.test_vectorized_query_all_neighbors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/tests/test_kdtree.py",
line 187, in test_vectorized_query_all_neighbors
    d, i = self.kdtree.query(np.zeros((2,4,3)),k=None,distance_upper_bound=1.1)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/kdtree.py",
line 434, in query
    for c in np.ndindex(retshape):
  File "/usr/local/lib/python2.7/dist-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/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py",
line 28, in as_strided
    return np.asarray(DummyArray(interface, base=x))
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py",
line 320, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: negative dimensions are not allowed

======================================================================
ERROR: test_kdtree.test_vectorization.test_vectorized_query_multiple_neighbors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/tests/test_kdtree.py",
line 175, in test_vectorized_query_multiple_neighbors
    d, i = self.kdtree.query(np.zeros((2,4,3)),k=kk)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/kdtree.py",
line 434, in query
    for c in np.ndindex(retshape):
  File "/usr/local/lib/python2.7/dist-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/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py",
line 28, in as_strided
    return np.asarray(DummyArray(interface, base=x))
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py",
line 320, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: negative dimensions are not allowed

======================================================================
ERROR: test_kdtree.test_random_ball_vectorized
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/tests/test_kdtree.py",
line 332, in test_random_ball_vectorized
    r = T.query_ball_point(np.random.randn(2,3,m),1)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/kdtree.py",
line 544, in query_ball_point
    for c in np.ndindex(retshape):
  File "/usr/local/lib/python2.7/dist-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/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py",
line 28, in as_strided
    return np.asarray(DummyArray(interface, base=x))
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py",
line 320, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: negative dimensions are not allowed

======================================================================
ERROR: test_kdtree.test_random_ball_vectorized_compiled
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/dist-packages/scipy/spatial/tests/test_kdtree.py",
line 342, in test_random_ball_vectorized_compiled
    r = T.query_ball_point(np.random.randn(2,3,m),1)
  File "ckdtree.pyx", line 1399, in
scipy.spatial.ckdtree.cKDTree.query_ball_point
(scipy/spatial/ckdtree.c:11875)
  File "/usr/local/lib/python2.7/dist-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/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py",
line 28, in as_strided
    return np.asarray(DummyArray(interface, base=x))
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py",
line 320, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: negative dimensions are not allowed

----------------------------------------------------------------------
Ran 5744 tests in 59.973s

FAILED (KNOWNFAIL=15, SKIP=36, errors=11)
[2]: <nose.result.TextTestResult run=5744 errors=11 failures=0>


More information about the SciPy-Dev mailing list