Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
- fix error with locating numpy include dir
- fix import_array errors
  • Loading branch information
gnodar01 committed Jul 11, 2024
1 parent b178071 commit 591dea7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13,810 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.eggs
.idea
.tox
centrosome/_propagate.c
__pycache__
build
centrosome.egg-info/
Expand Down
3 changes: 1 addition & 2 deletions centrosome/_cpmorphology2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ cdef extern from "numpy/arrayobject.h":
cdef Py_intptr_t *dimensions
cdef Py_intptr_t *shape
cdef Py_intptr_t *strides
cdef void import_array()
cdef int PyArray_ITEMSIZE(np.ndarray)

import_array()
np.import_array()

@cython.boundscheck(False)
def skeletonize_loop(np.ndarray[dtype=np.uint8_t, ndim=2,
Expand Down
3 changes: 1 addition & 2 deletions centrosome/_filter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ cdef extern from "numpy/arrayobject.h":
ctypedef class numpy.ndarray [object PyArrayObject]:
cdef char *data
cdef Py_intptr_t *strides
cdef void import_array()
cdef int PyArray_ITEMSIZE(np.ndarray)

cdef extern from "stdlib.h":
Expand All @@ -21,7 +20,7 @@ cdef extern from "stdlib.h":
cdef extern from "string.h":
void *memset(void *, int, int)

import_array()
np.import_array()

##############################################################################
#
Expand Down
3 changes: 1 addition & 2 deletions centrosome/_lapjv.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ cdef extern from "numpy/arrayobject.h":
cdef int nd
cdef Py_intptr_t *dimensions
cdef Py_intptr_t *strides
cdef void import_array()
cdef int PyArray_ITEMSIZE(np.ndarray)
cdef void * PyArray_DATA(np.ndarray)

import_array()
np.import_array()

__eps = np.sqrt(np.finfo(np.float64).eps)

Expand Down
Loading

0 comments on commit 591dea7

Please sign in to comment.