[Numpy-discussion] rank-0 arrays

Travis Oliphant oliphant at ee.byu.edu
Fri Sep 13 12:59:04 CDT 2002

> To restate the issue: there was a question about whether
> an index to an array that identified a single element only
> (i.e., not a slice, nor an incomplete index, e.g. x[3] where
> x is two dimensional) should return a Python scalar or a
> rank-0 array. Currently Numeric is inconsistent on this point.
> One usually gets scalars, but on some occasions, rank-0 arrays
> are returned. Good arguments are to be had for either alternative.

I think we should implement Python scalars for the other types and then
eliminate rank-0 arrays completely.  I could have a student do this in a
few weeks if it was agreed on.

-Travis Oliphant

More information about the Numpy-discussion mailing list