Issues with cpdef in jupyter notebook

18 views
Skip to first unread message

Matt Shmukler

unread,
May 28, 2024, 12:46:32 AMMay 28
to cython-users
I am running into the following issue using a jupyter notebook:
In one cell I have

%%cython --compile-args=-fopenmp --link-args=-fopenmp --verbose --force
cimport cython
import numpy as np
from cython.parallel cimport prange
cimport scipy.linalg.cython_lapack as lapack
import numpy as np
from libc.math cimport exp

cpdef double complex ensemble(p,df):
      ......
      return ....


In another cell I call this function 
print(ensemble(p,df))

which gives
NameError: name 'ensemble' is not defined
 


Reply all
Reply to author
Forward
0 new messages