MCPcopy Create free account
hub / github.com/numpy/numpy / any

Function any

numpy/array_api/_utility_functions.py:25–37  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.any `. See its docstring for more information.

(
    x: Array,
    /,
    *,
    axis: Optional[Union[int, Tuple[int, ...]]] = None,
    keepdims: bool = False,
)

Source from the content-addressed store, hash-verified

23
24
25def any(
26 x: Array,
27 /,
28 *,
29 axis: Optional[Union[int, Tuple[int, ...]]] = None,
30 keepdims: bool = False,
31) -> Array:
32 """
33 Array API compatible wrapper for :py:func:`np.any <numpy.any>`.
34
35 See its docstring for more information.
36 """
37 return Array._new(np.asarray(np.any(x._array, axis=axis, keepdims=keepdims)))

Callers 1

isdtypeFunction · 0.70

Calls 2

_newMethod · 0.80
anyMethod · 0.45

Tested by

no test coverage detected