Skip to content

Commit e2b6174

Browse files
authored
Merge pull request NCAR#128 from muchojp/develop
Library "collections" causes FutureWarning.
2 parents 1931176 + c263d7c commit e2b6174

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/wrf/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Constants(object):
1616

1717

1818
for key, val in viewitems(wrf_constants.__dict__):
19-
setattr(Constants, key.upper(), np.asscalar(val))
19+
setattr(Constants, key.upper(), val.item())
2020

2121
OMP_SCHED_STATIC = omp_constants.fomp_sched_static
2222
OMP_SCHED_DYNAMIC = omp_constants.fomp_sched_dynamic

src/wrf/decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import (absolute_import, division, print_function)
22

3-
from collections import Iterable, OrderedDict
3+
from collections import OrderedDict
4+
from collections.abc import Iterable
45

56
import wrapt
67
import numpy as np

src/wrf/latlonutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import (absolute_import, division, print_function)
22

3-
from collections import Iterable
3+
from collections.abc import Iterable
44

55
import numpy as np
66

src/wrf/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import os
44
from sys import version_info
55
from copy import copy
6-
from collections import Iterable, Mapping, OrderedDict
6+
from collections import OrderedDict
7+
from collections.abc import Iterable, Mapping
78
from itertools import product, tee
89
from types import GeneratorType
910
import datetime as dt

0 commit comments

Comments
 (0)