Returns the n-th discrete difference of the Array.
(self, n=1)
| 339 | return self + Array(b) |
| 340 | |
| 341 | def diff(self, n=1): |
| 342 | """ Returns the n-th discrete difference of the Array. """ |
| 343 | if n == 1: |
| 344 | return self[1:].sub(self[:-1]) |
| 345 | else: |
| 346 | return self[1:].sub(self[:-1]).diff(n - 1) |
| 347 | |
| 348 | def difference(self, b): |
| 349 | """ |