jurihock / stftPitchShift

STFT based real-time pitch and timbre shifting in C++ and Python
MIT License
115 stars 14 forks source link

Exception about resizing numpy arrays when debugging (and only when debugging) #31

Closed GrumpyBen closed 1 year ago

GrumpyBen commented 1 year ago

"ValueError: cannot resize an array references or is referenced by another array in this way. Use the resize function"

Looks like the debugger is not minding its business and keeping an extra reference

Corrected by changing next to last line of shiftpitch() in stftpitchshift.py from

output.resize(np.shape(input))

to

np.resize(output,np.shape(input))

jurihock commented 1 year ago

I've never used a debugger before... 😅

Sadly numpy.resize makes a copy and repeats input values in doubt, so I turned the refcheck option off instead, can't see anything dangerous.

jurihock commented 1 year ago

Fixed in 1.5.1 (pip)