The following fails on 32-bit windows with pandas 0.12:
>>> import pandas
>>> import numpy as np
>>> x = pandas.Series([1, 2, 3])
>>> np.repeat([1, 2, 3], x)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
np.repeat([1, 2, 3], x)
File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 343, in repeat
return _wrapit(a, 'repeat', repeats, axis)
File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 38, in _wrapit
result = getattr(asarray(obj),method)(*args, **kwds)
TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'
Needless to say this is surprising behavior. Is this a variation of
https://github.com/pydata/pandas/issues/3579 or something else? It works on 64-bit windows, so it seems to be a similar issue with conversion to platform int size.