[Numpy-discussion] why type(array(1).tolist()) is int?

Travis E. Oliphant oliphant at enthought.com
Wed Oct 1 09:58:32 EDT 2008


dmitrey wrote:
> let me also note that list(array((1))) returns
>
> Traceback (innermost last):
>  File "<stdin>", line 1, in <module>
> TypeError: iteration over a 0-d array
>
> D.
>   
This is expected.   0-d arrays are currently not iterable.

-Travis




More information about the NumPy-Discussion mailing list