summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_utility_functions.py
blob: 19743d15cdfd10e2c59828deed4f5e24cbe32ee2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import numpy as np

def all(x, /, *, axis=None, keepdims=False):
    """
    Array API compatible wrapper for :py:func:`np.all <numpy.all>`.

    See its docstring for more information.
    """
    return np.all(x, axis=axis, keepdims=keepdims)

def any(x, /, *, axis=None, keepdims=False):
    """
    Array API compatible wrapper for :py:func:`np.any <numpy.any>`.

    See its docstring for more information.
    """
    return np.any(x, axis=axis, keepdims=keepdims)