I want to use numpy.diff on a pandas Series. Am I right that this is a bug? Or am I doing it wrong?
In [163]: s = Series(np.arange(10))
In [164]: np.diff(s)
Out[164]:
0 NaN
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 NaN
In [165]: np.diff(np.arange(10))
Out[165]: array([1, 1, 1, 1, 1, 1, 1, 1, 1])
I am using pandas 0.9.1rc1, numpy 1.6.1.