From 8611dbe0a1e6099dd6cc64d535c4f7c06662413f Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Tue, 29 Nov 2022 14:32:19 -0500 Subject: [PATCH] Remove code used to support h5py<2.10.0 It seems that the relevant issue was fixed in 2.10.0 https://github.com/h5py/h5py/commit/466181b178c1b8a5bfa6fb8f217319e021f647e0 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. --- xarray/backends/h5netcdf_.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/xarray/backends/h5netcdf_.py b/xarray/backends/h5netcdf_.py index 10033587bf1..de5bef99853 100644 --- a/xarray/backends/h5netcdf_.py +++ b/xarray/backends/h5netcdf_.py @@ -46,9 +46,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]