Skip to content

Commit

Permalink
bumps Cython version to 3.0.0; adds explicit Cython language levels a…
Browse files Browse the repository at this point in the history
…nd removes numpy deprecations warnings
  • Loading branch information
derNarr committed Sep 19, 2023
1 parent 25f614b commit b7e96d7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyndl/correlation_openmp.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# cython: language_level=3
# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION

import numpy as np
cimport numpy as np
Expand Down
2 changes: 2 additions & 0 deletions pyndl/error_codes.pxd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cython: language_level=3

cdef enum ErrorCode:
NO_ERROR = 0
MAGIC_NUMBER_DOES_NOT_MATCH = 1
Expand Down
1 change: 1 addition & 0 deletions pyndl/ndl_openmp.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# cython: language_level=3
# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION

import numpy as np
import math
Expand Down
3 changes: 3 additions & 0 deletions pyndl/ndl_parallel.pxd
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# cython: language_level=3
# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION

cimport numpy as np
ctypedef np.float64_t dtype_t
from error_codes cimport ErrorCode
Expand Down
1 change: 1 addition & 0 deletions pyndl/ndl_parallel.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# cython: language_level=3
# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION

import numpy as np
import math
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ scipy = "^1.9.0"
pandas = "^1.4.3"
xarray = "^2022.6.0"
netCDF4 = "^1.6.0"
Cython = "^0.29.32"
Cython = "^3.0.0"

[tool.poetry.dev-dependencies]
pytest = "^7.0"
Expand Down

0 comments on commit b7e96d7

Please sign in to comment.