I am trying to generate a ndarray of audio file frequencies using the scipy.signal.stft() function and it randomly crashes half the time. When it crashes it raises the Exception: numpy.core._exceptions.MemoryError: Unable to allocate 257. MiB for an array with shape (32842, 513) and data type complex128, how do I free up memory for such a large array? Or is there any other solution?
ndarray
scipy.signal.stft()
numpy.core._exceptions.MemoryError: Unable to allocate 257. MiB for an array with shape (32842, 513) and data type complex128
here is my code
2.1m questions
2.1m answers
60 comments
57.0k users