-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
resample with numpy.product gives unexpected results #5586
Comments
I think this just needs a mapping like |
I had just fixed this when I realized there are lots of other numpy functions which will behave in the same way, e.g.
but
Is whitelisting them one by one really our best option? |
the nan ones are somewhat newer I think there are only a few more to add maybe could try some sort of regex matching on the name of the function? FYI since for example nanmean doesn't exist in older numpies have to conditionally add them |
Maybe we could go the other way, and blacklist the ones we haven't done. Admittedly that wouldn't catch But couldn't we just catch anything else in numpy and pass it First, check to see if it's been special cased. If so, use it. Vaguely like
|
yes I think that how could definitly be more strict in that you could evaluate on cases:
|
I like the warning idea, though I'm not sure what the appropriate label would be: SemiImplementedWarning, maybe? :^)
Whatever we do, I think the current approach of special-casing a few and letting the rest silently give incorrect results -- even though they're called in exactly the same way the ones which work do -- should be replaced with something noisier. |
you can say that you should use |
Looks fixed in master. Could use a test. |
@mroeschke what would we be testing? the |
|
So are tests required here now? if so, could I try to implement them? |
@baevpetr yes, that applies to any issue with the "Needs Tests" label |
for print df.resample('Q', how=numpy.product), was expecting:
The text was updated successfully, but these errors were encountered: