(ary, to_end=None, to_begin=None)
| 624 | |
| 625 | @derived_from(np) |
| 626 | def 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 | |
| 642 | def _gradient_kernel(x, block_id, coord, axis, array_locs, grad_kwargs): |
nothing calls this directly
no test coverage detected