Closed
Description
In [21]: a = np.empty(shape=(0,0))
In [22]: np.lib.apply_along_axis(sum, 1, a)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-22-2fcce4e707fd> in <module>()
----> 1 np.lib.apply_along_axis(sum, 1, a)
myvirtualenv/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/lib/shape_base.pyc in apply_along_axis(func1d, axis, arr, *args, **kwargs)
89 outshape = asarray(arr.shape).take(indlist)
90 i.put(indlist, ind)
---> 91 res = func1d(arr[tuple(i.tolist())], *args, **kwargs)
92 # if res is a number, then we have a smaller output array
93 if isscalar(res):
IndexError: index 0 is out of bounds for axis 0 with size 0
Metadata
Metadata
Assignees
Labels
No labels