[Numpy-discussion] indices with list arg?

Todd Miller jmiller at stsci.edu
Mon Dec 30 06:27:06 CST 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