MCPcopy Create free account
hub / github.com/Lauriat/funct / diff

Method diff

funct/Array.py:341–346  ·  view source on GitHub ↗

Returns the n-th discrete difference of the Array.

(self, n=1)

Source from the content-addressed store, hash-verified

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 """

Callers 1

testMethod · 0.95

Calls 1

subMethod · 0.80

Tested by 1

testMethod · 0.76