summaryrefslogtreecommitdiff
path: root/numpy/doc/byteswapping.py
diff options
context:
space:
mode:
authorNathaniel J. Smith <njs@pobox.com>2016-02-09 00:36:28 -0800
committerNathaniel J. Smith <njs@pobox.com>2016-02-09 16:31:29 -0800
commit925473229f9594046dc5e5a38d93103edd57f41b (patch)
tree5580a1f3d1fbfc2debc0253c3437a22d67d37bbf /numpy/doc/byteswapping.py
parent553137119d219d21229ec407b32d85e590d2a0c1 (diff)
downloadnumpy-925473229f9594046dc5e5a38d93103edd57f41b.tar.gz
MAINT: Use PySlice_GetIndicesEx instead of custom reimplementation
This has the side effects of: - changing several IndexError exceptions into TypeErrors - allowing slices like `arr[False:True]` as equivalent to `arr[0:1]` (because now we're using Python's logic for interpreting slices, and Python is happy with treating bools as integers in integer contexts). It also deletes almost 100 lines of code :-). While I was at it I also cleaned up some buggy uses of PySlice_GetIndices (which is pretty broken -- e.g. the code was assuming that it sets an exception on error, but this is not true! the Python docs explicitly recommend that you never use it.)
Diffstat (limited to 'numpy/doc/byteswapping.py')
0 files changed, 0 insertions, 0 deletions