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

Method __setitem__

xarray/backends/scipy_.py:112–122  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

110 return np.array(data, dtype=self.dtype, copy=copy)
111
112 def __setitem__(self, key, value):
113 with self.datastore.lock:
114 data = self.get_variable(needs_lock=False)
115 try:
116 data[key] = value
117 except TypeError:
118 if key is Ellipsis:
119 # workaround for GH: scipy/scipy#6880
120 data[:] = value
121 else:
122 raise
123
124
125# This is a dirty workaround to allow pickling of the flush_only_netcdf_file class.

Callers

nothing calls this directly

Calls 1

get_variableMethod · 0.95

Tested by

no test coverage detected