-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
- signalworks version: 0.3.1
- Python version: 3.7.5
- Operating System: macOS
Description
When calling tracking.wave.resample(some_freq), I get a new track back, but the dtype of the new_track was floating point (when the original track dtype was int16). This of course causes all sorts of havok with wave.min and wave.max, and thus plotting
Here is the code for resampling:
https://github.com/TimeViewers/signalworks/blob/master/signalworks/tracking/wave.py#L189-L202
In the end, it calls the Wave constructor, with the new values from resample_poly.
The thing to do here would be to convert the returned values into the dtype of the original array, something along the lines of
return type(self)(resample_poly(self._value, 1, int(self._fs / fs).astype(self._value.dtype), fs)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers