summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorjaimefrio <jaime.frio@gmail.com>2014-01-30 16:49:55 -0800
committerjaimefrio <jaime.frio@gmail.com>2014-01-30 16:51:00 -0800
commit839225599b1fb18ebb09424459ebd2066a8f21f9 (patch)
treea8ce9258dac55dfdc9cbad148bb15fdbdd959115 /numpy/polynomial/polyutils.py
parentad5bded8658c41161106a1ed51e3889bc1cf6b6b (diff)
downloadnumpy-839225599b1fb18ebb09424459ebd2066a8f21f9.tar.gz
BUG: check for monotonic bin arrays in digitize
The check for monotonic bin arrays of digitize doesn't properly handle inputs with repeated entries at the beginning of the array: ``` >>> np.__version__ '1.8.0' >>> np.digitize([1], [0, 0 , 2]) array([2], dtype=int64) >>> np.digitize([1], [2, 2, 0]) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: The bins must be monotonically increasing or decreasing ``` Modified `check_array_monotonic` in `_compiled_base.c` to skip over repeating entries before deciding to check for increasing or decreasing monotonicity and added relevant tests to `test_function_base.py`.
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions