arkouda.array_api.utility_functions =================================== .. py:module:: arkouda.array_api.utility_functions Functions --------- .. autoapisummary:: arkouda.array_api.utility_functions.all arkouda.array_api.utility_functions.any arkouda.array_api.utility_functions.clip arkouda.array_api.utility_functions.diff arkouda.array_api.utility_functions.pad Module Contents --------------- .. py:function:: all(x: arkouda.array_api.array_object.Array, /, *, axis: Optional[Union[int, Tuple[int, Ellipsis]]] = None, keepdims: bool = False) -> arkouda.array_api.array_object.Array Check whether all elements of an array evaluate to True along a given axis. :param x: The array to check for all True values :type x: Array :param axis: The axis or axes along which to check for all True values. If None, check all elements. :type axis: int or Tuple[int], optional :param keepdims: Whether to keep the singleton dimensions along `axis` in the result. :type keepdims: bool, optional .. py:function:: any(x: arkouda.array_api.array_object.Array, /, *, axis: Optional[Union[int, Tuple[int, Ellipsis]]] = None, keepdims: bool = False) -> arkouda.array_api.array_object.Array Check whether any elements of an array evaluate to True along a given axis. :param x: The array to check for any True values :type x: Array :param axis: The axis or axes along which to check for any True values. If None, check all elements. :type axis: int or Tuple[int], optional :param keepdims: Whether to keep the singleton dimensions along `axis` in the result. :type keepdims: bool, optional .. py:function:: clip(a: arkouda.array_api.array_object.Array, a_min, a_max, /) -> arkouda.array_api.array_object.Array Clip (limit) the values in an array to a given range. :param a: The array to clip :type a: Array :param a_min: The minimum value :type a_min: scalar :param a_max: The maximum value :type a_max: scalar .. py:function:: diff(a: arkouda.array_api.array_object.Array, /, n: int = 1, axis: int = -1, prepend=None, append=None) -> arkouda.array_api.array_object.Array Calculate the n-th discrete difference along the given axis. :param a: The array to calculate the difference :type a: Array :param n: The order of the finite difference. Default is 1. :type n: int, optional :param axis: The axis along which to calculate the difference. Default is the last axis. :type axis: int, optional :param prepend: Array to prepend to `a` along `axis` before calculating the difference. :type prepend: Array, optional :param append: Array to append to `a` along `axis` before calculating the difference. :type append: Array, optional .. py:function:: pad(array: arkouda.array_api.array_object.Array, pad_width, mode='constant', **kwargs) -> arkouda.array_api.array_object.Array Pad an array. :param array: The array to pad :type array: Array :param pad_width: Number of values padded to the edges of each axis. If a single int, the same value is used for all axes. If a tuple of two ints, those values are used for all axes. If a tuple of tuples, each inner tuple specifies the number of values padded to the beginning and end of each axis. :type pad_width: int or Tuple[int, int] or Tuple[Tuple[int, int], ...] :param mode: Padding mode. Only 'constant' is currently supported. Use the `constant_values` keyword argument to specify the padding value or values (in the same format as `pad_width`). :type mode: str, optional