MCPcopy Create free account
hub / github.com/pydata/xarray / get_array

Method get_array

xarray/backends/netCDF4_.py:107–114  ·  view source on GitHub ↗
(self, needs_lock=True)

Source from the content-addressed store, hash-verified

105 __slots__ = ()
106
107 def get_array(self, needs_lock=True):
108 ds = self.datastore._acquire(needs_lock)
109 variable = ds.variables[self.variable_name]
110 variable.set_auto_maskandscale(False)
111 # only added in netCDF4-python v1.2.8
112 with suppress(AttributeError):
113 variable.set_auto_chartostring(False)
114 return variable
115
116 def __getitem__(self, key):
117 return indexing.explicit_indexing_adapter(

Callers 1

_getitemMethod · 0.95

Calls 1

_acquireMethod · 0.45

Tested by

no test coverage detected