numpy diff two arrays code example Example: numpy difference between two arrays import numpy as np result = np.subtract([1.1, 2.2, 3.3], [1, 2, 3])