diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index a6c9b32..e346489 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -31,7 +31,7 @@ jobs: CIBW_ARCHS_MACOS: "x86_64 arm64" CIBW_BEFORE_BUILD: | pip install --upgrade pip - pip install "numpy>=1.26.3,<2.0" "cython>=3.0.8,<4.0" + pip install "numpy>=2.0,<3.0" "cython>=3.0.10,<4.0" CIBW_BUILD_VERBOSITY: 1 - name: Upload artifact diff --git a/.github/workflows/test_pypi_publish.yml b/.github/workflows/test_pypi_publish.yml index 04c9982..a8286d1 100644 --- a/.github/workflows/test_pypi_publish.yml +++ b/.github/workflows/test_pypi_publish.yml @@ -33,7 +33,7 @@ jobs: CIBW_ARCHS_MACOS: "x86_64 arm64" CIBW_BEFORE_BUILD: | pip install --upgrade pip - pip install "numpy>=1.26.3,<2.0" "cython>=3.0.8,<4.0" + pip install "numpy>=2.0,<3.0" "cython>=3.0.10,<4.0" CIBW_BUILD_VERBOSITY: 1 - name: Upload artifact diff --git a/matchmaker/utils/math.py b/matchmaker/utils/math.py index 0d963ea..6c32708 100644 --- a/matchmaker/utils/math.py +++ b/matchmaker/utils/math.py @@ -40,7 +40,7 @@ def discrete_normal_density(x, mu, sigma2, grid, log=False): # evaluate the normal density on the grid prob = normal_density(grid, mu, sigma2) # normalize to have a discrete distribution - out = normal_density(x, mu, sigma2) * np.in1d(x, grid) / np.sum(prob) + out = normal_density(x, mu, sigma2) * np.isin(x, grid) / np.sum(prob) if log: out = np.log(out) return out diff --git a/pyproject.toml b/pyproject.toml index 35f515e..f084c25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=80.0,<81", "Cython==3.0.8", "numpy>=1.26.3,<2.0", "build", "cibuildwheel"] +requires = ["setuptools>=80.0,<81", "Cython>=3.0.10,<4.0", "numpy>=2.0,<3.0", "build", "cibuildwheel"] build-backend = "setuptools.build_meta" [project] @@ -29,8 +29,8 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dependencies = [ - "cython>=3.0.8", - "numpy>=1.26.3,<2.0", + "cython>=3.0.10", + "numpy>=1.26.3", "scipy>=1.11.4", "librosa>=0.10.1", "pandas>=2.0.0",