MCPcopy Index your code
hub / github.com/pydata/xarray / H5NetCDFArrayWrapper

Class H5NetCDFArrayWrapper

xarray/backends/h5netcdf_.py:61–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61class H5NetCDFArrayWrapper(BaseNetCDF4Array):
62 def get_array(self, needs_lock=True):
63 ds = self.datastore._acquire(needs_lock)
64 return ds.variables[self.variable_name]
65
66 def __getitem__(self, key):
67 return indexing.explicit_indexing_adapter(
68 key, self.shape, indexing.IndexingSupport.OUTER_1VECTOR, self._getitem
69 )
70
71 def _getitem(self, key):
72 with self.datastore.lock:
73 array = self.get_array(needs_lock=False)
74 return array[key]
75
76
77def _read_attributes(h5netcdf_var):

Callers 2

open_store_variableMethod · 0.85
prepare_variableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…