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

@ -77,7 +77,7 @@ def randomize(self, rand_gen=None, *args, **kwargs):
# now draw from prior where possible
x = self.param_array.copy()
[np.put(x, ind, p.rvs(ind.size)) for p, ind in self.priors.items() if not p is None]
unfixlist = np.ones((self.size,),dtype=np.bool)
unfixlist = np.ones((self.size,),dtype=bool)
from paramz.transformations import __fixed__
unfixlist[self.constraints[__fixed__]] = False
self.param_array.flat[unfixlist] = x.view(np.ndarray).ravel()[unfixlist]