cupy.in1d¶
-
cupy.in1d(ar1, ar2, assume_unique=False, invert=False)[source]¶ Tests whether each element of a 1-D array is also present in a second array.
Returns a boolean array the same length as
ar1that isTruewhere an element ofar1is inar2andFalseotherwise.Parameters: - ar1 (cupy.ndarray) – Input array.
- ar2 (cupy.ndarray) – The values against which to test each value of
ar1. - assume_unique (bool, optional) – Ignored
- invert (bool, optional) – If
True, the values in the returned array are inverted (that is,Falsewhere an element ofar1is inar2andTrueotherwise). Default isFalse.
Returns: The values
ar1[in1d]are inar2.Return type: