BUG: Numpy Ufunc generates unintuitive AttributeError on object arrays #3781

danielballan opened this Issue Jun 6, 2013 · 3 comments


None yet
3 participants

danielballan commented Jun 6, 2013


In [15]: np.log(Series([1,2,3,4], dtype='object'))
AttributeError                            Traceback (most recent call last)
<ipython-input-15-25deca6462b7> in <module>()
----> 1 np.log(Series([1,2,3,4], dtype='object'))

AttributeError: log

This is really a numpy issue (opened by Wes back in 2009, as Andy Hayden pointed out). But since object arrays are especially common in database output, as was the case in this SO question, there some places in pandas where we can help avoid this error.


hayd commented Jun 7, 2013

And on github here: numpy/numpy#1611


hayd commented Jun 7, 2013

(just to say how grateful I am that you can just drop into the pandas directory and import pandas (without needing to install)... apparently you can't do this in numpy.)


jreback commented Feb 18, 2014

closing as this is a numpy issue (and pandas can't do anything about it)

jreback closed this Feb 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment