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
ar1
that isTrue
where an element ofar1
is inar2
andFalse
otherwise.- 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,False
where an element ofar1
is inar2
andTrue
otherwise). Default isFalse
.
- Returns
y – The values
ar1[in1d]
are inar2
.- Return type