import cupy


def all(a, axis=None, out=None, keepdims=False):
    assert isinstance(a, cupy.ndarray)
    return a.all(axis=axis, out=out, keepdims=keepdims)


def any(a, axis=None, out=None, keepdims=False):
    assert isinstance(a, cupy.ndarray)
    return a.any(axis=axis, out=out, keepdims=keepdims)

import cupy


def all(a, axis=None, out=None, keepdims=False):
    """Tests whether all array elements along a given axis evaluate to True.

    Args:
        a (cupy.ndarray): Input array.
        axis (int or tuple of ints): Along which axis to compute all.
            The flattened array is used by default.
        out (cupy.ndarray): Output array.
        keepdims (bool): If ``True``, the axis is remained as an axis of
            size one.

    Returns:
        cupy.ndarray: An array reduced of the input array along the axis.

    .. seealso:: :data:`numpy.all`

    """
    assert isinstance(a, cupy.ndarray)
    return a.all(axis=axis, out=out, keepdims=keepdims)


def any(a, axis=None, out=None, keepdims=False):
    """Tests whether any array elements along a given axis evaluate to True.

    Args:
        a (cupy.ndarray): Input array.
        axis (int or tuple of ints): Along which axis to compute all.
            The flattened array is used by default.
        out (cupy.ndarray): Output array.
        keepdims (bool): If ``True``, the axis is remained as an axis of
            size one.

    Returns:
        cupy.ndarray: An array reduced of the input array along the axis.

    .. seealso:: :data:`numpy.any`

    """
    assert isinstance(a, cupy.ndarray)
    return a.any(axis=axis, out=out, keepdims=keepdims)

Add documents of cupy.all and cupy.any function
Add documents of cupy.all and cupy.any function

  import cupy
  
  
  def all(a, axis=None, out=None, keepdims=False):
+     """Tests whether all array elements along a given axis evaluate to True.
+ 
+     Args:
+         a (cupy.ndarray): Input array.
+         axis (int or tuple of ints): Along which axis to compute all.
+             The flattened array is used by default.
+         out (cupy.ndarray): Output array.
+         keepdims (bool): If ``True``, the axis is remained as an axis of
+             size one.
+ 
+     Returns:
+         cupy.ndarray: An array reduced of the input array along the axis.
+ 
+     .. seealso:: :data:`numpy.all`
+ 
+     """
      assert isinstance(a, cupy.ndarray)
      return a.all(axis=axis, out=out, keepdims=keepdims)
  
  
  def any(a, axis=None, out=None, keepdims=False):
+     """Tests whether any array elements along a given axis evaluate to True.
+ 
+     Args:
+         a (cupy.ndarray): Input array.
+         axis (int or tuple of ints): Along which axis to compute all.
+             The flattened array is used by default.
+         out (cupy.ndarray): Output array.
+         keepdims (bool): If ``True``, the axis is remained as an axis of
+             size one.
+ 
+     Returns:
+         cupy.ndarray: An array reduced of the input array along the axis.
+ 
+     .. seealso:: :data:`numpy.any`
+ 
+     """
      assert isinstance(a, cupy.ndarray)
      return a.any(axis=axis, out=out, keepdims=keepdims)
  
Add documents of cupy.all and cupy.any function
## Code Before:
import cupy


def all(a, axis=None, out=None, keepdims=False):
    assert isinstance(a, cupy.ndarray)
    return a.all(axis=axis, out=out, keepdims=keepdims)


def any(a, axis=None, out=None, keepdims=False):
    assert isinstance(a, cupy.ndarray)
    return a.any(axis=axis, out=out, keepdims=keepdims)

## Instruction:
Add documents of cupy.all and cupy.any function
## Code After:
import cupy


def all(a, axis=None, out=None, keepdims=False):
    """Tests whether all array elements along a given axis evaluate to True.

    Args:
        a (cupy.ndarray): Input array.
        axis (int or tuple of ints): Along which axis to compute all.
            The flattened array is used by default.
        out (cupy.ndarray): Output array.
        keepdims (bool): If ``True``, the axis is remained as an axis of
            size one.

    Returns:
        cupy.ndarray: An array reduced of the input array along the axis.

    .. seealso:: :data:`numpy.all`

    """
    assert isinstance(a, cupy.ndarray)
    return a.all(axis=axis, out=out, keepdims=keepdims)


def any(a, axis=None, out=None, keepdims=False):
    """Tests whether any array elements along a given axis evaluate to True.

    Args:
        a (cupy.ndarray): Input array.
        axis (int or tuple of ints): Along which axis to compute all.
            The flattened array is used by default.
        out (cupy.ndarray): Output array.
        keepdims (bool): If ``True``, the axis is remained as an axis of
            size one.

    Returns:
        cupy.ndarray: An array reduced of the input array along the axis.

    .. seealso:: :data:`numpy.any`

    """
    assert isinstance(a, cupy.ndarray)
    return a.any(axis=axis, out=out, keepdims=keepdims)
