Fix issues encountered in modern python versions (#1011)

* Update setup.py

remove special handling of scipy dependencies for old python versions

* Update __init__.py

replace numpy type by native type

* replace np.bool by bool
This commit is contained in:
Martin Bubel 2023-04-21 18:32:33 +02:00 committed by GitHub
parent f63ed48b0d
commit 3c3ec60dea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 11 deletions

View file

@ -82,9 +82,9 @@ def gradient_fill(x, percentiles, ax=None, fignum=None, **kwargs):
y2 = np.ones_like(x) * y2
if where is None:
where = np.ones(len(x), np.bool)
where = np.ones(len(x), bool)
else:
where = np.asarray(where, np.bool)
where = np.asarray(where, bool)
if not (x.shape == y1.shape == y2.shape == where.shape):
raise ValueError("Argument dimensions are incompatible")

View file

@ -255,9 +255,9 @@ class MatplotlibPlots(AbstractPlottingLibrary):
y2 = np.ones_like(x) * y2
if where is None:
where = np.ones(len(x), np.bool)
where = np.ones(len(x), bool)
else:
where = np.asarray(where, np.bool)
where = np.asarray(where, bool)
if not (x.shape == y1.shape == y2.shape == where.shape):
raise ValueError("Argument dimensions are incompatible")