{ } Raw JSON

bundles / scipy 1.17.1 / scipy / _lib / array_api_extra / _lib / _utils / _helpers / in1d

function

scipy._lib.array_api_extra._lib._utils._helpers:in1d

source: /scipy/_lib/array_api_extra/_lib/_utils/_helpers.py :63

Signature

def   in1d ( x1 : Array x2 : Array / assume_unique : bool = False invert : bool = False xp : ModuleType | None = None )  →  Array

Summary

Check whether each element of an array is also present in a second array.

Extended Summary

Returns a boolean array the same length as x1 that is True where an element of x1 is in x2 and False otherwise.

This function has been adapted using the original implementation present in numpy: https://github.com/numpy/numpy/blob/v1.26.0/numpy/lib/arraysetops.py#L524-L758

Aliases

  • scipy.differentiate.xpx._delegation._funcs._helpers.in1d