[Numpy-discussion] numarray: shape of scalar
jmiller at stsci.edu
Tue Mar 9 10:29:21 EST 2004
On Tue, 2004-03-09 at 13:00, Sebastian Haase wrote:
> Is this intended:
> >>> na.array([1,2,4]).shape
> >>> na.array([1,2]).shape
> >>> na.array().shape
> >>> na.array(1).shape
> Why is na.array().shape not equal to na.array(1).shape ?
na.array(1) is how you say "make a rank-0 array with contents 1". There
are places where it is natural and useful in the *implementation* of
> Did I miss the respective section in the manual ?
rank-0 arrays are a dark corner of numarray which is mostly hidden. I
don't think they're documented anywhere.
Todd Miller <jmiller at stsci.edu>
More information about the NumPy-Discussion