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

Function is_scalar

xarray/core/extension_array.py:30–32  ·  view source on GitHub ↗

Workaround: pandas is_scalar doesn't recognize Categorical nulls for some reason.

(value: object)

Source from the content-addressed store, hash-verified

28
29
30def is_scalar(value: object) -> bool:
31 """Workaround: pandas is_scalar doesn't recognize Categorical nulls for some reason."""
32 return value is pd.CategoricalDtype.na_value or pd_is_scalar(value)
33
34
35def implements(numpy_function_or_name: Callable | str) -> Callable:

Callers 3

as_extension_arrayFunction · 0.70
__getitem__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…