argtopk(a, k, axis=-1, split_every=None)
This performs best when k
is much smaller than the chunk size. All results will be returned in a single chunk along the given axis.
Data being sorted
See topk
. The performance considerations for topk also apply here.
Extract the indices of the k largest elements from a on the given axis, and return them sorted from largest to smallest. If k is negative, extract the indices of the -k smallest elements instead, and return them sorted from smallest to largest.
>>> import dask.array as daThis example is valid syntax, but we were not able to check execution
... x = np.array([5, 1, 3, 6])
... d = da.from_array(x, chunks=2)
... d.argtopk(2).compute() array([3, 0])
>>> d.argtopk(-2).compute() array([1, 2])See :
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