You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
@svilendobrev This issue was raised in #35 and should have been fixed by #36 .
I checked that your test code works with python 3.14.3, numpy 2.4.3, and samplerate 0.2.4.
Could you please update to the latest version of samplerate (0.2.4) and try again?
Activity
fakufaku commentedon Mar 29, 2026
@svilendobrev This issue was raised in #35 and should have been fixed by #36 .
I checked that your test code works with python 3.14.3, numpy 2.4.3, and samplerate 0.2.4.
Could you please update to the latest version of samplerate (0.2.4) and try again?
svilendobrev commentedon Mar 30, 2026
hm. Yes. it works after re-installing. Seems some cached old version was in the way. Thank you and sorry for the noise
fakufaku commentedon Mar 30, 2026
No worries, happy this is solved easily!