Skip to content

Commit bc5558e

Browse files
authored
silence import warning (#2635)
1 parent 85ded91 commit bc5558e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

xarray/core/indexing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import functools
44
import operator
5-
from collections import Hashable, defaultdict
5+
from collections import defaultdict
66
from datetime import timedelta
77

88
import numpy as np
@@ -13,6 +13,11 @@
1313
dask_array_type, integer_types, iteritems, range, suppress)
1414
from .utils import is_dict_like
1515

16+
try:
17+
from collections.abc import Hashable
18+
except ImportError: # Py2
19+
from collections import Hashable
20+
1621

1722
def expanded_indexer(key, ndim):
1823
"""Given a key for indexing an ndarray, return an equivalent key which is a

0 commit comments

Comments
 (0)