From c39f6602ad75c48b1f08e154fcf9773ed91d6d59 Mon Sep 17 00:00:00 2001 From: Lukas Platz <lukas@lplatz.de> Date: Sun, 6 Jun 2021 15:52:10 +0200 Subject: [PATCH] replace np.float with np.floating in type check `np.float` was deprecated in Numpy 1.20: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations --- src/minimization/kl_energies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/minimization/kl_energies.py b/src/minimization/kl_energies.py index 6fb32a041..b1ecee8ec 100644 --- a/src/minimization/kl_energies.py +++ b/src/minimization/kl_energies.py @@ -227,9 +227,9 @@ class _GeoMetricSampler: # Check domain dtype dts = H._prior._met._dtype if isinstance(H.domain, DomainTuple): - real = np.issubdtype(dts, np.float) + real = np.issubdtype(dts, np.floating) else: - real = all([np.issubdtype(dts[kk], np.float) for kk in dts.keys()]) + real = all([np.issubdtype(dts[kk], np.floating) for kk in dts.keys()]) if not real: raise ValueError("_GeoMetricSampler only supports real valued latent DOFs.") # /Check domain dtype -- GitLab