Two TimeInterpolator tests are failing. The traceback:
===================================== FAILURES ======================================
__________________________ test_interp_outside_range[next] __________________________
Traceback (most recent call last):
File "/home/mpiper/projects/pymt/tests/framework/test_timeinterp.py", line 88, in test_interp_outside_range
assert np.isfinite(interp(4.5)) and interp(4.5) >= 4.0
AssertionError: assert (False)
+ where False = <ufunc 'isfinite'>(array(nan))
+ where <ufunc 'isfinite'> = np.isfinite
+ and array(nan) = <pymt.framework.timeinterp.TimeInterpolator object at 0x7fe5596021a0>(4.5)
_________________________ test_interp_below_range[previous] _________________________
Traceback (most recent call last):
File "/home/mpiper/projects/pymt/tests/framework/test_timeinterp.py", line 96, in test_interp_below_range
assert np.isfinite(interp(-0.5)) and interp(-0.5) >= 4.0
AssertionError: assert (False)
+ where False = <ufunc 'isfinite'>(array(nan))
+ where <ufunc 'isfinite'> = np.isfinite
+ and array(nan) = <pymt.framework.timeinterp.TimeInterpolator object at 0x7fe5596012a0>(-0.5)
The problem lies with the behavior of the previous and next methods of scipy.interpolate.interp1d, which TimeInterpolator uses. The issue https://github.com/scipy/scipy/issues/16997 explains the old (scipy<1.9) and new (scipy>=1.9) behavior of these methods. It looks like the new behavior is expected, so we'll need to update our tests.
Two TimeInterpolator tests are failing. The traceback:
The problem lies with the behavior of the
previous
andnext
methods of scipy.interpolate.interp1d, which TimeInterpolator uses. The issue https://github.com/scipy/scipy/issues/16997 explains the old (scipy<1.9
) and new (scipy>=1.9
) behavior of these methods. It looks like the new behavior is expected, so we'll need to update our tests.