Skip to content

Commit

Permalink
Remove code used to support h5py<2.10.0 (#7334)
Browse files Browse the repository at this point in the history
It seems that the relevant issue was fixed in 2.10.0
h5py/h5py@466181b

I'm not sure how far back you want to fix things. I'm hoping to test
this on the CI.

I found this since I've been auditing slowdowns in our codebase, which
has caused me to review much of the reading pipeline.
  • Loading branch information
hmaarrfk authored Nov 30, 2022
1 parent 3aa75c8 commit 2fb22cf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions xarray/backends/h5netcdf_.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import io
import os

import numpy as np
from packaging.version import Version

from ..core import indexing
Expand Down Expand Up @@ -46,9 +45,6 @@ def __getitem__(self, key):
)

def _getitem(self, key):
# h5py requires using lists for fancy indexing:
# https://github.com/h5py/h5py/issues/992
key = tuple(list(k) if isinstance(k, np.ndarray) else k for k in key)
with self.datastore.lock:
array = self.get_array(needs_lock=False)
return array[key]
Expand Down

0 comments on commit 2fb22cf

Please sign in to comment.