MCPcopy Create free account
hub / github.com/dask/dask / ediff1d

Function ediff1d

dask/array/routines.py:626–639  ·  view source on GitHub ↗
(ary, to_end=None, to_begin=None)

Source from the content-addressed store, hash-verified

624
625@derived_from(np)
626def ediff1d(ary, to_end=None, to_begin=None):
627 ary = asarray(ary)
628
629 aryf = ary.flatten()
630 r = aryf[1:] - aryf[:-1]
631
632 r = [r]
633 if to_begin is not None:
634 r = [asarray(to_begin).flatten()] + r
635 if to_end is not None:
636 r = r + [asarray(to_end).flatten()]
637 r = concatenate(r)
638
639 return r
640
641
642def _gradient_kernel(x, block_id, coord, axis, array_locs, grad_kwargs):

Callers

nothing calls this directly

Calls 3

asarrayFunction · 0.90
concatenateFunction · 0.90
flattenMethod · 0.80

Tested by

no test coverage detected