othertime.SecondsSince returns bad values when an xarray timeseries is input, and does not throw any warning.
e.g.
time = np.arange(np.datetime64('2000-01-01'), np.datetime64('2000-01-02'), np.timedelta64(1,'h'))
time = time.astype('datetime64[ns]')
time_xr = xr.DataArray(data=time)
othertime.SecondsSince returns bad values when an xarray timeseries is input, and does not throw any warning.
e.g. time = np.arange(np.datetime64('2000-01-01'), np.datetime64('2000-01-02'), np.timedelta64(1,'h')) time = time.astype('datetime64[ns]') time_xr = xr.DataArray(data=time)
print(othertime.SecondsSince(time, basetime=datetime(2000,1,1))) print(othertime.SecondsSince(time_xr, basetime=datetime(2000,1,1)))
[ 0. 3600. 7200. 10800. 14400. 18000. 21600. 25200. 28800. 32400.