[Numpy-discussion] bug or feature?
Curzio Basso
curzio.basso at gmail.com
Mon Jul 11 10:40:18 EDT 2005
Hi all,
I noticed the following (unexpected for me) behaviour:
>>> a = NA.arange(12)
>>> a.shape = (3,4)
>>> a[[0,2]][:,:2] = a[[0,2]][:,2:]
>>> print a
array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]])
rather than
array([[ 2, 3, 2, 3],
[ 4, 5, 6, 7],
[ 10, 11, 10, 11]])
as I was expecting. This happens only if I try to combine indices
lists with slices.
Is it by design or I ran into a bug?
curzio
More information about the NumPy-Discussion
mailing list