-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Exception With np.frompyfunc #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can't find a code revision where this works-- tried 0.4.0 and mid-august commit too, any help here? |
The vectorized function above doesn't work on regular NumPy arrays so this may be a NumPy bug. I am using 1.6.1 |
Yes, this works in 1.4.0. I'll close this issue as it's external. |
Weird. i can create an issue on numpy/numpy on github |
I think you can work around the problem by specifying "dtype='object'": |
Revert "Revert "Revert "Merge pull request pandas-dev#363 from manahl/add-conca…
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'
The text was updated successfully, but these errors were encountered: