Skip to content

Commit

Permalink
cython/*.pyx: upgrade to newer numpy API
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlijnWajer committed Jun 26, 2024
1 parent e5804a5 commit 9d1268b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cython/optimiser.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import numpy as np
cimport numpy as np
cimport cython

INTDTYPE = np.int_
INTDTYPE = np.int32_
UINT8DTYPE = np.uint8
ctypedef np.int_t INTDTYPE_t
ctypedef np.int32_t INTDTYPE_t
ctypedef np.uint8_t UINT8DTYPE_t

# Speed up the code and let's make sure all variables have a c type, otherwise performs goes out of
Expand Down
4 changes: 2 additions & 2 deletions cython/sauvola.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import numpy as np
cimport numpy as np
cimport cython

INTDTYPE = np.int_
INTDTYPE = np.int32_
UINT8DTYPE = np.uint8

ctypedef np.int_t INTDTYPE_t
ctypedef np.int32_t INTDTYPE_t
ctypedef np.uint8_t UINT8DTYPE_t

# Speed up the code
Expand Down

0 comments on commit 9d1268b

Please sign in to comment.