[Numpy-discussion] numarray: shape of scalar

Sebastian Haase haase at msg.ucsf.edu
Tue Mar 9 10:10:05 EST 2004


Hi,
Is this intended:
>>> na.array([1,2,4]).shape
(3,)
>>> na.array([1,2]).shape
(2,)
>>> na.array([1]).shape
(1,)
>>> na.array(1).shape
()

Why is na.array([1]).shape not equal to na.array(1).shape ?
Did I miss the respective section in the manual ?

Thanks,
Sebastian Haase





More information about the NumPy-Discussion mailing list