MCPcopy
hub / github.com/pydata/xarray / test_fill_value_coder_inf_nan

Function test_fill_value_coder_inf_nan

xarray/tests/test_backends.py:7268–7276  ·  view source on GitHub ↗

Test that FillValueCoder round-trips inf and nan fill values.

(value, dtype)

Source from the content-addressed store, hash-verified

7266 ],
7267)
7268def test_fill_value_coder_inf_nan(value, dtype) -> None:
7269 """Test that FillValueCoder round-trips inf and nan fill values."""
7270 from xarray.backends.zarr import FillValueCoder
7271
7272 encoded = FillValueCoder.encode(value, np.dtype(dtype))
7273 decoded = FillValueCoder.decode(encoded, np.dtype(dtype))
7274 np.testing.assert_equal(
7275 np.array(decoded, dtype=dtype), np.array(value, dtype=dtype)
7276 )
7277
7278
7279@requires_zarr

Callers

nothing calls this directly

Calls 3

encodeMethod · 0.45
dtypeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…