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

Method encode_variable

xarray/backends/netCDF4_.py:618–624  ·  view source on GitHub ↗
(self, variable, name=None)

Source from the content-addressed store, hash-verified

616 self.ds.setncattr(key, value)
617
618 def encode_variable(self, variable, name=None):
619 variable = _force_native_endianness(variable)
620 if self.format == "NETCDF4":
621 variable = _encode_nc4_variable(variable, name=name)
622 else:
623 variable = encode_nc3_variable(variable, name=name)
624 return variable
625
626 def prepare_variable(
627 self, name, variable: Variable, check_encoding=False, unlimited_dims=None

Callers

nothing calls this directly

Calls 3

encode_nc3_variableFunction · 0.90
_force_native_endiannessFunction · 0.85
_encode_nc4_variableFunction · 0.85

Tested by

no test coverage detected