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

Function _get_data_namespace

xarray/namedarray/_array_api.py:24–28  ·  view source on GitHub ↗
(x: NamedArray[Any, Any])

Source from the content-addressed store, hash-verified

22
23
24def _get_data_namespace(x: NamedArray[Any, Any]) -> ModuleType:
25 if isinstance(x._data, _arrayapi):
26 return x._data.__array_namespace__()
27
28 return np
29
30
31# %% Creation Functions

Callers 5

nbytesMethod · 0.90
imagFunction · 0.85
realFunction · 0.85
expand_dimsFunction · 0.85
permute_dimsFunction · 0.85

Calls 1

__array_namespace__Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…