[Numpy-discussion] NumArray - take method

Colin J. Williams cjw at sympatico.ca
Thu Dec 9 14:39:03 CST 2004


This undocumented method has puzzling behaviour.

[Dbg]>>> a
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
[Dbg]>>> b= a[1:1]
[Dbg]>>> b
array([])
[Dbg]>>> b.shape
(0, 3)
[Dbg]>>> b.rank
2

I had expected a rank of zero and an indeterminate shape.

Colin W.




More information about the Numpy-discussion mailing list