Skip to content

Commit

Permalink
New version (pip?) causes problems with cnp.int_t
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeyiasemis committed Jun 24, 2024
1 parent e41f3b3 commit e1290bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions direct/common/_gaussian.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def gaussian_mask_1d(
int n,
int center,
double std,
cnp.ndarray[cnp.int_t, ndim=1, mode='c'] mask,
cnp.ndarray[cnp.int32_t, ndim=1, mode='c'] mask,
int seed,
):
cdef int count, ind
Expand All @@ -82,7 +82,7 @@ def gaussian_mask_2d(
int center_x,
int center_y,
cnp.ndarray[cnp.float_t, ndim=1, mode='c'] std,
cnp.ndarray[cnp.int_t, ndim=2, mode='c'] mask,
cnp.ndarray[cnp.int32_t, ndim=2, mode='c'] mask,
int seed,
):
cdef int count, indx, indy
Expand Down
6 changes: 3 additions & 3 deletions direct/common/_poisson.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def poisson(
int nx,
int ny,
int max_attempts,
cnp.ndarray[cnp.int_t, ndim=2, mode='c'] mask,
cnp.ndarray[cnp.int32_t, ndim=2, mode='c'] mask,
cnp.ndarray[cnp.float64_t, ndim=2, mode='c'] radius_x,
cnp.ndarray[cnp.float64_t, ndim=2, mode='c'] radius_y,
int seed
Expand All @@ -62,8 +62,8 @@ def poisson(
cdef Py_ssize_t startx, endx, starty, endy, px, py

# initialize active list
cdef cnp.ndarray[cnp.int_t, ndim=1, mode='c'] pxs = np.empty(nx * ny, dtype=int)
cdef cnp.ndarray[cnp.int_t, ndim=1, mode='c'] pys = np.empty(nx * ny, dtype=int)
cdef cnp.ndarray[cnp.int32_t, ndim=1, mode='c'] pxs = np.empty(nx * ny, dtype=int)
cdef cnp.ndarray[cnp.int32_t, ndim=1, mode='c'] pys = np.empty(nx * ny, dtype=int)

srand(seed)

Expand Down
4 changes: 2 additions & 2 deletions direct/ssl/_gaussian_fill.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def gaussian_fill(
int center_x,
int center_y,
double std_scale,
cnp.ndarray[cnp.int_t, ndim=2, mode='c'] mask,
cnp.ndarray[cnp.int_t, ndim=2, mode='c'] output_mask,
cnp.ndarray[cnp.int32_t, ndim=2, mode='c'] mask,
cnp.ndarray[cnp.int32_t, ndim=2, mode='c'] output_mask,
int seed,
):
cdef int count, indx, indy
Expand Down

0 comments on commit e1290bc

Please sign in to comment.