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

Method encode

xarray/backends/common.py:718–725  ·  view source on GitHub ↗
(self, variables, attributes)

Source from the content-addressed store, hash-verified

716 __slots__ = ()
717
718 def encode(self, variables, attributes):
719 # All NetCDF files get CF encoded by default, without this attempting
720 # to write times, for example, would fail.
721 variables, attributes = cf_encoder(variables, attributes)
722 variables = {
723 k: ensure_dtype_not_object(v, name=k) for k, v in variables.items()
724 }
725 return super().encode(variables, attributes)
726
727
728class BackendEntrypoint:

Callers

nothing calls this directly

Calls 3

cf_encoderFunction · 0.90
ensure_dtype_not_objectFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected