[Numpy-svn] [numpy/numpy] 11859c: BUG: ticket #2097, fix bounds checking in searchso...

GitHub noreply at github.com
Thu Apr 5 11:20:23 EDT 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 11859c0a2f113e66fdd8384eea93b688a8e08b22
      https://github.com/numpy/numpy/commit/11859c0a2f113e66fdd8384eea93b688a8e08b22
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2012-04-05 (Thu, 05 Apr 2012)

  Changed paths:
    M numpy/core/src/multiarray/item_selection.c
  M numpy/core/tests/test_multiarray.py

  Log Message:
  -----------
  BUG: ticket #2097, fix bounds checking in searchsorted when sorter invoked.

The bounds are checked on the fly. This won't always raise an error if
there is an out of bounds index, but only when that index is used in the
binary search. Since we don't check that the sorter actually sorts the
array, this seems reasonable. Only safety is ensured, not correctness.





More information about the Numpy-svn mailing list