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

Function _normalize_args

xarray/plot/dataset_plot.py:708–722  ·  view source on GitHub ↗
(
    plotmethod: str, args: tuple[Any, ...], kwargs: dict[str, Any]
)

Source from the content-addressed store, hash-verified

706
707
708def _normalize_args(
709 plotmethod: str, args: tuple[Any, ...], kwargs: dict[str, Any]
710) -> dict[str, Any]:
711 from xarray.core.dataarray import DataArray
712
713 # Determine positional arguments keyword by inspecting the
714 # signature of the plotmethod:
715 locals_ = dict(
716 inspect.signature(getattr(DataArray().plot, plotmethod))
717 .bind(*args, **kwargs)
718 .arguments.items()
719 )
720 locals_.update(locals_.pop("kwargs", {}))
721
722 return locals_
723
724
725def _temp_dataarray(ds: Dataset, y: Hashable, locals_: dict[str, Any]) -> DataArray:

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
itemsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…