[PYTHON MATRIX-SIG] 2D slices of 1D array

Martin Szummer szummer@media.mit.edu
Tue, 18 Feb 1997 22:17:52 -0500


The following slice of a 1D array surprised me:

>>> c = array([1,2,3,4,5])
>>> c
1 2 3 4 5
>>> c[1:3, :]
EmptyArray

I was expecting either 1,2,3 or an error.
Is there any rational for this?  
The behavior is the same for higher dimensional arrays as well.

(This is using Numeric 1.06a and Python 1.4)

-- Martin Szummer
   MIT

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________