Message33574
Logged In: YES
user_id=6380
I checked the Numeric-21.0 source, and they don't use
PySlice_GetIndices. They have their own function,
slice_GetIndices, which appears to be a reformatted copy of
PySlice_GetIndices. except that the fiddling at the end is
different: it truncates out-of-bounds indices rather than
calling them errors, and it doesn't call step==0 an error
(why?).
I also checked the numarray-0.3.3 source, and they don't do
slices yet.
So I think we're safe fixing PySlice_GetIndices.
However, I think there's a bug in your code. Suppose a is
range(10). Then a[1000:] returns []. But a[1000::] returns
[9]! Similarly, a[-1000::-1] return [0] where I would expect
[]. I think the start/stop truncation needs to depend on the
step, too. |
|
Date |
User |
Action |
Args |
2007-08-23 15:00:48 | admin | link | issue400998 messages |
2007-08-23 15:00:48 | admin | create | |
|