Given that I have the following two vectors:
In [99]: time_index Out[99]: [1484942413, 1484942712, 1484943012, 1484943312, 1484943612, 1484943912, 1484944
A naive explanation would be that diff literally subtracts following entries while np.gradient uses a central difference scheme.