[Numpy-discussion] NumArray - take method

Timo Korvola tkorvola at e.math.helsinki.fi
Sat Dec 11 05:26:12 EST 2004


"Colin J. Williams" <cjw at sympatico.ca> writes:
> I had expected a rank of zero and an indeterminate shape.

Rank zero would imply shape () and that the result is a scalar.  Empty
arrays have positive rank but one or more of the dimensions are zero.
It seems that there is a bug in repr as it does not distinguish
between empty arrays of different shapes.

The current behaviour is consistent in the sense that indexing by a
slice does not change rank, not even if the slice has length zero or
one (a slice of length one is thus different from an integer).  Only
the indexed dimension changes.

-- 
	Timo Korvola		<URL:http://www.iki.fi/tkorvola>




More information about the NumPy-Discussion mailing list