-
Notifications
You must be signed in to change notification settings - Fork 17
resample error in python==3.14/numpy==2.4.2 #39
Copy link
Copy link
Closed
Description
the error is:
r = samplerate.resample( y, ratio, res_type ) #simpleAPI
ValueError: cannot resize an array that references or is referenced
by another array in this way.
Use the np.resize function or refcheck=False
happens when ratio is non-int with fractional non-power-of-2 ( e.g. 3 works, 1.5 works, 1.51 does not).
e.g.
import samplerate,numpy
a = numpy.array( range( 44))
samplerate.resample( a, 1.51)
fails for numpy==2.4.2 but works ok with numpy==2.3.4
Note: the recent docs for numpy.resize mention something similar, may or may not be related: https://numpy.org/devdocs/reference/generated/numpy.ndarray.resize.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels