NumPy now raises a deprecation warning when constructing a timedelta without a unit:
>>> np.timedelta64(15)
<python-input-5>:1: DeprecationWarning: The 'generic' unit for NumPy timedelta is deprecated, and will raise an error in the future. This includes implicit conversion of bare integers (e.g. `+ 1`).Please use a specific unit instead.
np.timedelta64(15)
This trips up our tests in https://github.com/scipp/scipp/actions/runs/28449665963/job/84308178323 where we use
sc.arange(
't',
np.datetime64('2022-08-02T11:18'),
np.datetime64('2022-08-02T11:52'),
15
)
This can be fixed by passing the step size as np.timedelta64(15, 'm').
Do we want to update arange to automatically deduce a unit for the step size or do we go with NumPy's new behaviour?
NumPy now raises a deprecation warning when constructing a timedelta without a unit:
This trips up our tests in https://github.com/scipp/scipp/actions/runs/28449665963/job/84308178323 where we use
This can be fixed by passing the step size as
np.timedelta64(15, 'm').Do we want to update
arangeto automatically deduce a unit for the step size or do we go with NumPy's new behaviour?