{ } Raw JSON

bundles / scipy 1.18.0 / scipy / _external / array_api_extra / _delegation / union1d

function

scipy._external.array_api_extra._delegation:union1d

source: /scipy/_external/array_api_extra/_delegation.py:1112

Signature

def union1d(a: Array, b: Array, /, xp: ModuleType | None = None) → Array

Summary

Find the union of two arrays.

Extended Summary

Return the unique, sorted array of values that are in either of the two input arrays.

Parameters

a, b : Array

Input arrays. They are flattened internally if they are not already 1D.

xp : array_namespace, optional

The standard-compatible namespace for a and b. Default: infer.

Returns

: Array

Unique, sorted union of the input arrays.

Notes

This function is not compatible with jax.jit. See the docstring of the corresponding JAX function for more information.

See also

jax.numpy.union1d

Corresponding function in JAX.

Aliases

  • scipy.differentiate.xpx.union1d