From fa15fac24c84493cff1ad6676d10224d6a19d557 Mon Sep 17 00:00:00 2001 From: muchojp <61620767+muchojp@users.noreply.github.com> Date: Fri, 9 Oct 2020 09:20:36 +0900 Subject: [PATCH] Update constants.py Replace from numpy.asscalar to item() because numpy.asscalar causes FutureWarning. Deprecated since numpy version 1.16: Deprecated, use numpy.ndarray.item() instead. --- src/wrf/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrf/constants.py b/src/wrf/constants.py index 47821ef..1128855 100755 --- a/src/wrf/constants.py +++ b/src/wrf/constants.py @@ -16,7 +16,7 @@ class Constants(object): for key, val in viewitems(wrf_constants.__dict__): - setattr(Constants, key.upper(), np.asscalar(val)) + setattr(Constants, key.upper(), val.item()) OMP_SCHED_STATIC = omp_constants.fomp_sched_static OMP_SCHED_DYNAMIC = omp_constants.fomp_sched_dynamic