arkouda.array_api.searching_functions¶
Functions¶
|
Return an array with the indices of the maximum values along a given axis. |
|
Return an array with the indices of the minimum values along a given axis. |
|
Return a tuple of arrays containing the indices of the non-zero elements of the input array. |
|
Given a sorted array x1, find the indices to insert elements from another array x2 such that |
|
Return elements, either from x1 or x2, depending on condition. |
Module Contents¶
- arkouda.array_api.searching_functions.argmax(x: arkouda.array_api.array_object.Array, /, *, axis: int | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]¶
Return an array with the indices of the maximum values along a given axis.
- arkouda.array_api.searching_functions.argmin(x: arkouda.array_api.array_object.Array, /, *, axis: int | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]¶
Return an array with the indices of the minimum values along a given axis.
- arkouda.array_api.searching_functions.nonzero(x: arkouda.array_api.array_object.Array, /) Tuple[arkouda.array_api.array_object.Array, Ellipsis][source]¶
Return a tuple of arrays containing the indices of the non-zero elements of the input array.
- arkouda.array_api.searching_functions.searchsorted(x1: arkouda.array_api.array_object.Array, x2: arkouda.array_api.array_object.Array, /, *, side: Literal['left', 'right'] = 'left', x2_sorted: bool = False, sorter: arkouda.array_api.array_object.Array | None = None) arkouda.array_api.array_object.Array[source]¶
Given a sorted array x1, find the indices to insert elements from another array x2 such that the sorted order is maintained.
- Parameters:
x1 (Array) – The sorted array to search in.
x2 (Array) – The values to search for in x1.
side ({'left', 'right'}, optional) – If ‘left’, the index of the first suitable location found is given. If ‘right’, return the last such index. Default is ‘left’.
x2_sorted (bool, default=False) – If True, assumes that x2 is already sorted in ascending order. This can improve performance for large, sorted search arrays. If False, no assumption is made about the order of x2.
sorter (Array, optional) – The indices that would sort x1 in ascending order. If None, x1 is assumed to be sorted.
- arkouda.array_api.searching_functions.where(condition: arkouda.array_api.array_object.Array, x1: arkouda.array_api.array_object.Array, x2: arkouda.array_api.array_object.Array, /) arkouda.array_api.array_object.Array[source]¶
Return elements, either from x1 or x2, depending on condition.