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

Function _check_for_slashes_in_names

xarray/core/datatree.py:218–227  ·  view source on GitHub ↗
(variables: Iterable[Hashable])

Source from the content-addressed store, hash-verified

216
217
218def _check_for_slashes_in_names(variables: Iterable[Hashable]) -> None:
219 offending_variable_names = [
220 name for name in variables if isinstance(name, str) and "/" in name
221 ]
222 if len(offending_variable_names) > 0:
223 raise ValueError(
224 "Given variables have names containing the '/' character: "
225 f"{offending_variable_names}. "
226 "Variables stored in DataTree objects cannot have names containing '/' characters, as this would make path-like access to variables ambiguous."
227 )
228
229
230class DatasetView(Dataset):

Callers 1

_set_node_dataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…