[Numpy-discussion] IndexExpression bug?
Michael McNeil Forbes
mforbes@physics.ubc...
Mon Aug 17 10:12:00 CDT 2009
Submitted as ticket 1196
http://projects.scipy.org/numpy/ticket/1196
On 5 Jun 2009, at 4:12 PM, Robert Kern wrote:
> On Fri, Jun 5, 2009 at 16:14, Michael McNeil Forbes
> <mforbes@physics.ubc.ca> wrote:
>> >>> np.array([0,1,2,3])[1:-1]
>> array([1, 2])
>>
>> but
>>
>> >>> np.array([0,1,2,3])[np.s_[1:-1]]
>> array([1, 2, 3])
>> >>> np.array([0,1,2,3])[np.index_exp[1:-1]]
>> array([1, 2, 3])
...
> I think that getting rid of __getslice__ and __len__ should work
> better. I don't really understand what the logic was behind including
> them in the first place, though. I might be missing something.
...
More information about the NumPy-Discussion
mailing list