On 21/02/2008, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > Could I ask that we also consider implementing len() for 0-d arrays? > numpy.asarray returns those as-is, and I would like to be able to > handle them just as I do any other 1-dimensional array. I don't know > if a length of 1 would be valid, given a shape of (), but there must > be some consistent way of handling them.
Well, if the length of an array is the product of all its sizes, the product of no things is customarily defined to be one... whether that is actually a useful value is another question. Anne _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion