cimport cythonimport numpy as npcimport numpy as np
from fit cimport fit #<--- CHANGING THIS FIXES THE ERROR
ctypedef np.float64_t DTYPE_t
cpdef DTYPE_t test(DTYPE_t[:,:] dat, DTYPE_t[:,:] regs): cdef DTYPE_t score = fit(dat, regs) return score
cimport cythonimport numpy as npcimport numpy as np
cpdef DTYPE_t fit(DTYPE_t[:,:] A, DTYPE_t[:,:] B): cdef DTYPE_t score return score
cimport cythonimport numpy as npcimport numpy as np
ctypedef np.float64_t DTYPE_t
cpdef DTYPE_t fit(DTYPE_t[:,:] dat, DTYPE_t[:,:] regs)
from setuptools import setup, find_packagesfrom setuptools.extension import Extensionfrom Cython.Build import cythonizeimport numpy
extensions = [ Extension( '*', include_dirs=[numpy.get_include()], language = 'c++', extra_compile_args = ['-ffast-math','-O3','-Wno-unused-function'], sources = ['*.pyx'] )]
setup( name = 'test', version = '0.0.1', packages = find_packages(), ext_modules = cythonize(extensions))
Memoryview 'DTYPE_t[:, :]' not conformable to memoryview 'DTYPE_t[:, :]'