MCPcopy Create free account
hub / github.com/pytest-dev/pytest / _is_numpy_array

Function _is_numpy_array

src/_pytest/python_api.py:724–729  ·  view source on GitHub ↗

Return true if the given object is implicitly convertible to ndarray, and numpy is already imported.

(obj: object)

Source from the content-addressed store, hash-verified

722
723
724def _is_numpy_array(obj: object) -> bool:
725 """
726 Return true if the given object is implicitly convertible to ndarray,
727 and numpy is already imported.
728 """
729 return _as_numpy_array(obj) is not None
730
731
732def _as_numpy_array(obj: object) -> Optional["ndarray"]:

Callers 1

approxFunction · 0.85

Calls 1

_as_numpy_arrayFunction · 0.85

Tested by

no test coverage detected