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

Function create_masked_and_scaled_data

xarray/tests/test_backends.py:260–268  ·  view source on GitHub ↗
(dtype: np.dtype)

Source from the content-addressed store, hash-verified

258
259
260def create_masked_and_scaled_data(dtype: np.dtype) -> Dataset:
261 x = np.array([np.nan, np.nan, 10, 10.1, 10.2], dtype=dtype)
262 encoding = {
263 "_FillValue": -1,
264 "add_offset": dtype.type(10),
265 "scale_factor": dtype.type(0.1),
266 "dtype": "i2",
267 }
268 return Dataset({"x": ("t", x, {}, encoding)})
269
270
271def create_encoded_masked_and_scaled_data(dtype: np.dtype) -> Dataset:

Callers 1

test_mask_and_scaleMethod · 0.85

Calls 1

DatasetClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…