ediff1d(ary, to_end=None, to_begin=None)
This docstring was copied from numpy.ediff1d.
Some inconsistencies with the Dask version may exist.
When applied to masked arrays, this function drops the mask information if the :None:None:`to_begin`
and/or :None:None:`to_end`
parameters are used.
If necessary, will be flattened before the differences are taken.
Number(s) to append at the end of the returned differences.
Number(s) to prepend at the beginning of the returned differences.
The differences. Loosely, this is ary.flat[1:] - ary.flat[:-1]
.
The differences between consecutive elements of an array.
>>> x = np.array([1, 2, 4, 7, 0]) # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... np.ediff1d(x) # doctest: +SKIP array([ 1, 2, 3, -7])
>>> np.ediff1d(x, to_begin=-99, to_end=np.array([88, 99])) # doctest: +SKIP array([-99, 1, 2, ..., -7, 88, 99])
The returned array is always 1D.
This example is valid syntax, but we were not able to check execution>>> y = [[1, 2, 4], [1, 6, 24]] # doctest: +SKIPSee :
... np.ediff1d(y) # doctest: +SKIP array([ 1, 2, -3, 5, 18])
The following pages refer to to this document either explicitly or contain code examples using this.
dask.array.routines.diff
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