bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _external / array_api_extra / _delegation / isin
function
scipy._external.array_api_extra._delegation:isin
source: build-install/usr/lib/python3.14/site-packages/scipy/_external/array_api_extra/_delegation.py:1426
Signature
def isin(a: Array, b: Array, /, assume_unique: bool = False, invert: bool = False, kind: str | None = None, xp: ArrayNamespace | None = None) → ArraySummary
Determine whether each element in a is present in b.
Extended Summary
This is array_api.isin, with additional assume_unique and kind parameters.
Parameters
a: arrayInput elements.
b: arrayThe elements against which to test each element of
a.assume_unique: bool, optionalIf True, the input arrays are both assumed to be unique which can speed up the calculation. Default: False.
invert: bool, optionalIf True, the values in the returned array are inverted. Default: False.
kind: str | None, optionalThe algorithm or method to use. This will not affect the final result, but will affect the speed and memory use. For NumPy the options are {None, "sort", "table"}. For Jax the mapped parameter is instead
methodand the options are {"compare_all", "binary_search", "sort", and "auto" (default)} For CuPy, Dask, Torch and the default case this parameter is not present and thus ignored. Default: None.xp: array_namespace, optionalThe standard-compatible namespace for
aandb. Default: infer.
Returns
: arrayAn array having the same shape as that of
athat is True for elements that are inband False otherwise.
Aliases
scipy.differentiate.xpx.isin