[Numpy-tickets] [NumPy] #288: Wrong message error for 0-dim slicing
NumPy
numpy-tickets at scipy.net
Fri Sep 22 11:52:16 CDT 2006
#288: Wrong message error for 0-dim slicing
------------------------+---------------------------------------------------
Reporter: faltet | Owner: somebody
Type: defect | Status: new
Priority: lowest | Milestone: 1.0 Release
Component: numpy.core | Version: devel
Severity: trivial | Keywords:
------------------------+---------------------------------------------------
Hi,
I think the next message is wrong:
{{{
In [64]: c=numpy.array(1)
In [65]: c[:]
---------------------------------------------------------------------------
<type 'exceptions.ValueError'> Traceback (most recent call
last)
/home/faltet/carabos/repositori/ceei/<ipython console> in <module>()
<type 'exceptions.ValueError'>: cannot slice a scalar
}}}
Instead, the message should be something like:
{{{
<type 'exceptions.IndexError'>: cannot slice a 0-d array
}}}
Thanks
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/288>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list