Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peak Detection error type (Python) #49

Closed
kerloom opened this issue Jan 29, 2014 · 2 comments
Closed

Peak Detection error type (Python) #49

kerloom opened this issue Jan 29, 2014 · 2 comments

Comments

@kerloom
Copy link

kerloom commented Jan 29, 2014

For the PeakDetection function I'm feeding a numpy.ndarray type of float64 and get the following error:

TypeError('essentia can currently only accept one-dimensional numpy arrays of dtype '
TypeError: essentia can currently only accept one-dimensional numpy arrays of dtype {"single", "int", "complex64"}

If it is not supported it would be a good enhancement because it is a very common data type.

@hector
Copy link
Contributor

hector commented Jan 29, 2014

It happened the same to me yesterday with another algorithm. Essentia does not seem to be supporting float64, but float32. Two solutions worked for me:

# first solution
from numpy import array
new_array = array(old_array, dtype='float32')    

# second solution (I prefer this one)
import essentia
new_array = essentia.array(old_array)

@kerloom
Copy link
Author

kerloom commented Jan 30, 2014

Thank you, this works!

@kerloom kerloom closed this as completed Jan 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants