I am getting errors when loading a Cython file in Jupyter Notebook. Any ideas?
%load_ext Cython
import numpy as np
cimport numpy as np
import cython
Just a simple error message:
File "<ipython-input-3-7e39dc7f561b>", line 5
cimport numpy as np
^
SyntaxError: invalid syntax
After reading the docs -- I used two separate cells. The first one is just:
%load_ext Cython
Then my import statements
%%cython
import numpy as np
cimport numpy as np
import cython
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With