Skip to content

Commit

Permalink
Address numpy>=2.0 issues (#1252)
Browse files Browse the repository at this point in the history
* Update `utils.py`

Update `UFuncTypeError` to be compatible with `numpy>=2.0`.

* Pin numpy from above

Pin numpy until third party libraries have fixed related issues.
  • Loading branch information
WeilerP committed Jun 18, 2024
1 parent f21651c commit d3e81d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies = [
"loompy>=2.0.12",
"umap-learn>=0.3.10",
"numba>=0.41.0",
"numpy>=1.17",
"numpy>=1.17, <2.0.0",
"pandas>=1.1.1, !=1.4.0",
"scipy>=1.4.1",
"scikit-learn>=0.21.2",
Expand Down
7 changes: 6 additions & 1 deletion scvelo/plotting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import numpy as np
import pandas as pd
from numpy.core._exceptions import UFuncTypeError
from pandas import Index
from scipy import stats
from scipy.sparse import issparse
Expand All @@ -24,6 +23,12 @@
from scvelo.tools.utils import strings_to_categoricals
from . import palettes

try:
from numpy.core._exceptions import UFuncTypeError
except ModuleNotFoundError:
from numpy._core._exceptions import UFuncTypeError


"""helper functions"""


Expand Down

0 comments on commit d3e81d9

Please sign in to comment.