Closed
Description
The following used to work:
In [7]: import pandas as pd
In [8]: import numpy as np
In [9]: a = np.zeros(5, dtype=np.float)
In [10]: df = pd.DataFrame({"foo": [10, 20, 30, 40, 50]})
In [11]: df.index
Out[11]: Int64Index([0, 1, 2, 3, 4], dtype='int64')
In [12]: df.index * 3.2
Out[12]: Int64Index([0.0, 3.2, 6.4, 9.6, 12.8], dtype='float64')
In [13]: a - df.index * 3.2
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-13-8a6574b7beca> in <module>()
----> 1 a - df.index * 3.2
TypeError: unsupported operand type(s) for -: 'numpy.ndarray' and 'Int64Index'
In [14]: pd.__version__
Out[14]: '0.15.0'