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

Jim Hugunin hugunin@mit.edu
Wed, 19 Feb 1997 19:08:38 -0500


This will now raise an IndexError exception as it should have all along.  

Thanks for the bug - Jim

-----Original Message-----
From:	Konrad Hinsen [SMTP:hinsen@ibs.ibs.fr]

> 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?  

None that I can think of. This ought to be an error.

Konrad.


_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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