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

Function _contains_str_like

xarray/core/accessor_str.py:90–98  ·  view source on GitHub ↗

Determine if the object is a str-like or array of str-like.

(pat: Any)

Source from the content-addressed store, hash-verified

88
89
90def _contains_str_like(pat: Any) -> bool:
91 """Determine if the object is a str-like or array of str-like."""
92 if isinstance(pat, str | bytes):
93 return True
94
95 if not hasattr(pat, "dtype"):
96 return False
97
98 return pat.dtype.kind in ["U", "S"]
99
100
101def _contains_compiled_re(pat: Any) -> bool:

Callers 1

replaceMethod · 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…