-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG/CLN: numpy compat with pandas numeric functions and cln of same (GH4435) #5034
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
Conversation
first PR with big deleted loc! |
@jtratner don't worry....going to wait for your big ops merger first! (though I don't think much will conflic) |
@jreback I know, nice to finally see something decrease the size of the codebase. Arithmetic refactor ended up about even if you exclude tests and docs changes. |
…g like: np.prod(obj) as numpy is now passing extra args to the pandas methods!
from the object level modules (e.g. mean/sum/min/max....)
@@ -1207,89 +1208,11 @@ def f(self, other, axis=0): | |||
return self._combine(other, na_op, axis=axis) | |||
f.__name__ = name | |||
return f | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtratner should this _panel_arith_method
be from core/ops.py?
(I tried to use ops._arith_method_PANEL
) which seemed very similar (though w/o the doc string creation) and it broke a small number of tests, so using this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't clear on this so I didn't touch it, we could probably move it eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np...thxs
BUG/CLN: numpy compat with pandas numeric functions and cln of same (GH4435)
related #4787 (keywords now pass thru to _reduce), default for
numeric
is stillNone
closes #4435
BUG: provide numpy compatibility with 1.7 when implicity using
__array__
, IOW:np.prod(s)
, ornp.mean(df,axis=1)
will now work (because numpy decided to try to see if theobject has this function and then pass all kinds of keywords to it, so pandas gets the right function called
with
dtype
, andout
passed in (currently ignored)CLN: refactored all numeric and stat like function (sum/mean/mad/min/max) and cums (cummin/sum..)
to
core/generic.py
from Series/DataFrame/Panel