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

Method drop_or_convert

xarray/core/dataset.py:4939–4946  ·  view source on GitHub ↗
(var_names)

Source from the content-addressed store, hash-verified

4937 new_variables: dict[Hashable, Variable] = {}
4938
4939 def drop_or_convert(var_names):
4940 if drop:
4941 drop_variables.update(var_names)
4942 else:
4943 base_vars = {
4944 k: self._variables[k].to_base_variable() for k in var_names
4945 }
4946 new_variables.update(base_vars)
4947
4948 for name in dims_or_levels:
4949 index = self._indexes[name]

Callers

nothing calls this directly

Calls 2

to_base_variableMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected