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

Method get_variable

xarray/backends/scipy_.py:87–89  ·  view source on GitHub ↗
(self, needs_lock: bool = True)

Source from the content-addressed store, hash-verified

85 self.dtype = np.dtype(array.dtype.kind + str(array.dtype.itemsize))
86
87 def get_variable(self, needs_lock: bool = True) -> scipy.io.netcdf_variable:
88 ds = self.datastore._manager.acquire(needs_lock)
89 return ds.variables[self.variable_name]
90
91 def _getitem(self, key):
92 with self.datastore.lock:

Callers 3

__init__Method · 0.95
_getitemMethod · 0.95
__setitem__Method · 0.95

Calls 1

acquireMethod · 0.45

Tested by

no test coverage detected