Link Cython-wrapped C functions against BLAS from NumPy
问题 I want to use inside a Cython extension some C functions defined in .c files that uses BLAS subroutines, e.g. cfile.c double ddot(int *N, double *DX, int *INCX, double *DY, int *INCY); double call_ddot(double* a, double* b, int n){ int one = 1; return ddot(&n, a, &one, b, &one); } (Let’s say the functions do more than just call one BLAS subroutine) pyfile.pyx cimport numpy as np import numpy as np cdef extern from "cfile.c": double call_ddot(double* a, double* b, int n) def pyfun(np.ndarray