[Numpy-discussion] Accessing rank-0 array value?
verveer at embl-heidelberg.de
Mon Jun 7 02:28:04 CDT 2004
or probably more appropriate since it retains the type:
Both not very intuitive, are there any better ways?
On 7 Jun 2004, at 11:17, Francesc Alted wrote:
> Perhaps this is a stupid question, but I did not found any easy way to
> the python object value from a rank-0 numarray array. That is:
>>>> from numarray import *
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> IndexError: Too many indices
> In C, that seem to be possible provided you use the call:
> PyObject* PyArray_Return(PyArrayObject *apr)
> Is there any way to do that in python?
More information about the Numpy-discussion