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

Function is_scalar

xarray/core/utils.py:385–390  ·  view source on GitHub ↗

Whether to treat a value as a scalar. Any non-iterable, string, or 0-D array

(value: Any, include_0d: bool = True)

Source from the content-addressed store, hash-verified

383
384
385def is_scalar(value: Any, include_0d: bool = True) -> TypeGuard[Hashable]:
386 """Whether to treat a value as a scalar.
387
388 Any non-iterable, string, or 0-D array
389 """
390 return _is_scalar(value, include_0d)
391
392
393def is_valid_numpy_dtype(dtype: Any) -> bool:

Callers 15

__contains__Method · 0.90
_determine_cmap_paramsFunction · 0.90
is_0d_dask_arrayFunction · 0.90
set_xindexMethod · 0.90
drop_varsMethod · 0.90
drop_indexesMethod · 0.90
dropMethod · 0.90
__init__Method · 0.90
interp_naFunction · 0.90
full_likeFunction · 0.90
iselMethod · 0.90

Calls 1

_is_scalarFunction · 0.85

Tested by 2

test_quantileMethod · 0.72
test_quantileMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…