[Numpy-discussion] indices with list arg?

Todd Miller jmiller at stsci.edu
Mon Dec 30 06:27:06 EST 2002


Magnus Lie Hetland wrote:

>Why isn't indices([42]) (or foo.setshape([42]), for that matter)
>allowed? Overzealous type checking, or a necessity of the C code?
>
>  
>
Neither.   It  looks like a limitation of the indices function.   
Inserting "shape = tuple(shape)" into indices() removed the limitation.

Thanks,
Todd





More information about the NumPy-Discussion mailing list