We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a4c5cc commit 6645dbaCopy full SHA for 6645dba
nitime/tests/test_timeseries.py
@@ -923,13 +923,13 @@ def test_timearray_math_functions(f, tu):
923
a = np.arange(2, 11)
924
b = ts.TimeArray(a, time_unit=tu)
925
if f == "ptp" and ts._NP_2:
926
- with pytest.raises(AttributeError, match='`ptp` was removed'):
927
- a.ptp() # ndarray.ptp removed in 2.0
928
- return
+ want = np.ptp(a)
+ else:
+ want = getattr(a, f)()
929
npt.assert_(getattr(b, f)().__class__ == ts.TimeArray)
930
npt.assert_(getattr(b, f)().time_unit == b.time_unit)
931
# comparison with unitless should convert to the TimeArray's units
932
- npt.assert_(getattr(b, f)() == getattr(a, f)())
+ npt.assert_(getattr(b, f)() == want)
933
934
935
def test_timearray_var_prod():
0 commit comments