select(condlist, choicelist, default=0)
This docstring was copied from numpy.select.
Some inconsistencies with the Dask version may exist.
The list of conditions which determine from which array in :None:None:`choicelist`
the output elements are taken. When multiple conditions are satisfied, the first one encountered in :None:None:`condlist`
is used.
The list of arrays from which the output elements are taken. It has to be of the same length as :None:None:`condlist`
.
The element inserted in :None:None:`output`
when all conditions evaluate to False.
The output at position m is the m-th element of the array in :None:None:`choicelist`
where the m-th element of the corresponding array in :None:None:`condlist`
is True.
Return an array drawn from elements in choicelist, depending on conditions.
where
Return elements from one of two arrays depending on condition.
>>> x = np.arange(6) # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... condlist = [x<3, x>3] # doctest: +SKIP
... choicelist = [x, x**2] # doctest: +SKIP
... np.select(condlist, choicelist, 42) # doctest: +SKIP array([ 0, 1, 2, 42, 16, 25])
>>> condlist = [x<=4, x>3] # doctest: +SKIPSee :
... choicelist = [x, x**2] # doctest: +SKIP
... np.select(condlist, choicelist, 55) # doctest: +SKIP array([ 0, 1, 2, 3, 4, 25])
The following pages refer to to this document either explicitly or contain code examples using this.
dask.array.routines.piecewise
dask.array.routines.compress
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