jax.numpy.setxor1d
Warning
This page was created from a pull request (#9655).
jax.numpy.setxor1dΒΆ
- jax.numpy.setxor1d(ar1, ar2, assume_unique=False)[source]ΒΆ
Find the set exclusive-or of two arrays.
LAX-backend implementation of
setxor1d()
.In the JAX version, the input arrays are explicitly flattened regardless of assume_unique value.
Original docstring below.
Return the sorted, unique values that are in only one (not both) of the input arrays.
- Parameters
ar1 (array_like) β Input arrays.
ar2 (array_like) β Input arrays.
assume_unique (bool) β If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False.
- Returns
setxor1d β Sorted 1D array of unique values that are in only one of the input arrays.
- Return type