wesm/pandas — Issue #380: Exception With np.frompyfunc
Author: craustin
Created: 2011-11-17 22:16:02+00:00
State: open

from aqr.core.frame import DataFrame
import numpy as np
def func(a, b):
return a + b
df = DataFrame({'US':[1,2,3]})
f = np.frompyfunc(func, 2, 1)
print f.accumulate(df)

In pre-0.4.0 pandas, this printed:
US
0 1
1 3
2 6

Now, this:
ValueError: could not find a matching type for func (vectorized).accumulate, requested type has type code 'q'