cupy.isin#
- cupy.isin(element, test_elements, assume_unique=False, invert=False)[source]#
Calculates element in
test_elements
, broadcasting overelement
only. Returns a boolean array of the same shape aselement
that isTrue
where an element ofelement
is intest_elements
andFalse
otherwise.- Parameters:
element (cupy.ndarray) – Input array.
test_elements (cupy.ndarray) – The values against which to test each value of
element
. This argument is flattened if it is an array or array_like.assume_unique (bool, optional) – Ignored
invert (bool, optional) – If
True
, the values in the returned array are inverted, as if calculating element not intest_elements
. Default isFalse
.
- Returns:
y – Has the same shape as
element
. The valueselement[isin]
are intest_elements
.- Return type: