diff --git a/zarr/indexing.py b/zarr/indexing.py index 4e5633f939..f1b1f89aa7 100644 --- a/zarr/indexing.py +++ b/zarr/indexing.py @@ -691,11 +691,7 @@ def __init__(self, selection, array): self.chunk_rixs = np.nonzero(self.chunk_nitems)[0] # unravel chunk indices - if tuple(map(int, np.__version__.split('.')[:2])) < (1, 16): - self.chunk_mixs = np.unravel_index(self.chunk_rixs, dims=array._cdata_shape) - else: - # deal with change dims->shape in arguments as of numpy 1.16 - self.chunk_mixs = np.unravel_index(self.chunk_rixs, shape=array._cdata_shape) + self.chunk_mixs = np.unravel_index(self.chunk_rixs, array._cdata_shape) def __iter__(self): diff --git a/zarr/tests/test_meta.py b/zarr/tests/test_meta.py index 5051ff4379..6c094b4dfa 100644 --- a/zarr/tests/test_meta.py +++ b/zarr/tests/test_meta.py @@ -13,8 +13,6 @@ def assert_json_equal(expect, actual): - if isinstance(expect, bytes): # pragma: py3 no cover - expect = str(expect, 'ascii') if isinstance(actual, bytes): actual = str(actual, 'ascii') ej = json.loads(expect) diff --git a/zarr/util.py b/zarr/util.py index 47b1082941..0bfdee6844 100644 --- a/zarr/util.py +++ b/zarr/util.py @@ -510,15 +510,6 @@ def is_valid_python_name(name): return name.isidentifier() and not iskeyword(name) -def class_dir(klass): # pragma: py3 no cover - d = dict() - d.update(klass.__dict__) - bases = klass.__bases__ - for base in bases: - d.update(class_dir(base)) - return d - - class NoLock(object): """A lock that doesn't lock."""