hfawaz / aaltd18

Data augmentation using synthetic data for time series classification with deep residual networks
GNU General Public License v3.0
183 stars 42 forks source link

Error with "./utils/build-cython.sh" #1

Closed petteriTeikari closed 5 years ago

petteriTeikari commented 6 years ago

Thanks a lot for providing the code for this data augmentation, and for the time series benchmarking :)

I could not get your Cython build to go through as you were probably missing these lines from your setup.py, as I got this error:

dtw.c:579:10: fatal error: numpy/arrayobject.h: No such file or directory
 #include "numpy/arrayobject.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I changed your setup.py to this, and it seems to be working:

from distutils.core import setup
from Cython.Build import cythonize
import numpy

setup(
      ext_modules=cythonize("dtw.pyx"),
      include_dirs=[numpy.get_include()]
)
hfawaz commented 6 years ago

Hello,

Thank you for sharing the problem.

I think this has to do with python environments or maybe with API versions because for it is working properly.

But anyone who encounter an error with Cython should try your suggestion which is why I labeled the issue as "good first issue" !!

Do not hesitate if you have more questions and good luck !!