From: David H. <dav...@gm...> - 2006-05-12 16:50:26
|
Hi, I noticed that slicing outside bounds with lists returns the whole list : >>> a =3D range(5) >>> a[-7:] [0, 1, 2, 3, 4] while in numpy, array has a weird behavior >>> a =3D numpy.arange(5) >>> a[-7:] array([3, 4]) # Ok, it takes modulo(index, length) but >>> a[-11:] array([0, 1, 2, 3, 4]) # ??? Cheers, David |