Skip to content

Fix a numpy 2 deprecation warning (dtype "a" code) #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions graphblas/tests/test_dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import graphblas as gb
from graphblas import core, dtypes
from graphblas.core import lib
from graphblas.core.utils import _NP2
from graphblas.dtypes import lookup_dtype

suitesparse = gb.backend == "suitesparse"
Expand Down Expand Up @@ -228,6 +229,9 @@ def test_dtype_to_from_string():
# See NEP 55 about StringDtype "T". Notably, this doesn't work:
# >>> np.dtype(np.dtype("T").str)
continue
if _NP2 and c == "a":
# Data type alias 'a' was deprecated in NumPy 2.0. Use the 'S' alias instead.
continue
try:
dtype = np.dtype(c)
types.append(dtype)
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ conda search 'flake8-bugbear[channel=conda-forge]>=24.12.12'
conda search 'flake8-simplify[channel=conda-forge]>=0.21.0'
conda search 'numpy[channel=conda-forge]>=2.2.3'
conda search 'pandas[channel=conda-forge]>=2.2.3'
conda search 'scipy[channel=conda-forge]>=1.15.1'
conda search 'scipy[channel=conda-forge]>=1.15.2'
conda search 'networkx[channel=conda-forge]>=3.4.2'
conda search 'awkward[channel=conda-forge]>=2.7.4'
conda search 'sparse[channel=conda-forge]>=0.15.5'
Expand Down
Loading