Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy diff

x = np.array([1, 2, 4, 7, 0])
np.diff(x)
array([ 1,  2,  3, -7])
np.diff(x, n=2)
array([  1,   1, -10])
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #numpy #diff
ADD COMMENT
Topic
Name
7+3 =