When the time dimension is timedelta64 type rather than datetime64 the value specified in stft must be a timedelta64, but it should also support a float/int value which gets converted into a timedelta64. When the time coordinate is a datetime64 this works as intended.
Example
import dascore as dc
patch = dc.get_example_patch()
time = patch.get_coord("time")
new = patch.update_coords(time=time.values - time.values[-1])
new.stft(time=.1) # Raises an error
new.stft(time=dc.to_timedelta64(.1)) # works
Also, the time coordinate seems to be wrong on the transform in this case.
Expected behavior
Versions
- OS [e.g. Ubuntu 20.04]:
- DASCore Version [e.g. 0.0.5]: Master branch
- Python Version [e.g. 3.10]:
When the time dimension is
timedelta64type rather thandatetime64the value specified instftmust be a timedelta64, but it should also support a float/int value which gets converted into atimedelta64. When the time coordinate is adatetime64this works as intended.Example
Also, the time coordinate seems to be wrong on the transform in this case.
Expected behavior
Versions