dask 2021.10.0

ParametersReturns
union1d(ar1, ar2)

This docstring was copied from numpy.union1d.

Some inconsistencies with the Dask version may exist.

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

Parameters

ar1, ar2 : array_like

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

Returns

union1d : ndarray

Unique, sorted union of the input arrays.

Find the union of two arrays.

See Also

numpy.lib.arraysetops

Module with a number of other functions for performing set operations on arrays.

Examples

This example is valid syntax, but we were not able to check execution
>>> np.union1d([-1, 0, 1], [-2, 0, 2])  # doctest: +SKIP
array([-2, -1,  0,  1,  2])

To find the union of more than two arrays, use functools.reduce:

This example is valid syntax, but we were not able to check execution
>>> from functools import reduce  # doctest: +SKIP
... reduce(np.union1d, ([1, 3, 4, 3], [3, 1, 2, 1], [6, 3, 4, 2])) # doctest: +SKIP array([1, 2, 3, 4, 6])
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/routines.py#1848
type: <class 'function'>
Commit: