Commit 7f695370 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix for find_nearest(). Updated version info.

parent 73a7caf5
Pipeline #3313 passed with stages
in 19 minutes and 9 seconds
......@@ -31,9 +31,9 @@ def find_nearest(array, value, roundAlg='auto', extrapolate=False, exclude_val=F
if extrapolate:
increment = abs(array[1] - array[0])
if value > max(array): # expand array until value
array = np.arange(min(array), value + increment, increment)
array = np.arange(min(array), value + 2 * increment, increment) # 2 * inc to make array_sub work below
if value < min(array): # negatively expand array until value
array = (np.arange(max(array), value - increment, -increment))[::-1]
array = (np.arange(max(array), value - 2 * increment, -increment))[::-1]
elif value < min(array) or value > max(array):
raise ValueError('Value %s is outside of the given array.' % value)
......
__version__ = '0.13.3'
__versionalias__ = '20181203_02'
__version__ = '0.13.4'
__versionalias__ = '20181203_03'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment