Skip to content

COMPAT: breakage with just merged: https://github.com/numpy/numpy/pull/7325 #12687

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

Closed
jreback opened this issue Mar 22, 2016 · 11 comments
Labels
Compat pandas objects compatability with Numpy or Python functions
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Mar 22, 2016

see here
xref #12603
#12644

numpy issue 7325

cc @gfyoung
cc @njsmith

@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Mar 22, 2016
@jreback jreback added this to the 0.18.1 milestone Mar 22, 2016
@jreback
Copy link
Contributor Author

jreback commented Mar 22, 2016

@gfyoung I think we just need to also accept **kwargs (and validate)

@gfyoung
Copy link
Member

gfyoung commented Mar 22, 2016

@jreback : The test needs to be modified to check which version of numpy we are using. That exception will only be thrown if we're not using numpy-dev (on numpy-dev, no exceptions will be thrown because the DataFrame or Series gets converted to a numpy array). What's the best the way to check numpy version?

@jreback
Copy link
Contributor Author

jreback commented Mar 22, 2016

I don't think its a test failure, rather need to accept **kwargs AS WELL as *args (similar to how we do in the stat functions). The signature is consistent across all versions of numpy. I don't want to see specific version tests, except in very specific cases.

In [1]: pd.Series.round?
Signature: pd.Series.round(self, decimals=0, *args)

@gfyoung
Copy link
Member

gfyoung commented Mar 22, 2016

Fair enough. I'll tackle this issue in a PR that will also fix #12644.

@jreback
Copy link
Contributor Author

jreback commented Mar 25, 2016

@gfyoung if you have a chance on this one. annoying when master fails :< (even though its the allowed failures, that's just to make it finish faster :)

@gfyoung
Copy link
Member

gfyoung commented Mar 25, 2016

@jreback : No worries. As I said above, I'll fix it in a PR that will address all of the fromnumeric.py compat issues.

@jreback
Copy link
Contributor Author

jreback commented Mar 25, 2016

@gfyoung ok, great.

@jreback
Copy link
Contributor Author

jreback commented Mar 30, 2016

@gfyoung if you are looking for something to do.....I want to fix the failing build on travis (numpy compat build) for this (can leave open for more general things).

@gfyoung
Copy link
Member

gfyoung commented Apr 1, 2016

@jreback : Alas, the fix is more complicated than just adding **kwargs. I didn't consider in #7325 the fact that a function can raise TypeError that isn't necessarily a signature compatibility issue, like when you try to take the sum of a Series with Categorical data.

xref #7491 in numpy (this PR will fix the issue on the numpy end)

@gfyoung
Copy link
Member

gfyoung commented Apr 6, 2016

My massive PR #12810 will address this breakage on the pandas side now. The combination of my numpy PR and this one should fully fix the problem.

@charris
Copy link

charris commented Apr 7, 2016

Does this fix the pandas breakage without any work on the pandas side? I'm somewhat annoyed that there was a problem.

OOPS: wrong PR ;)

@jreback jreback modified the milestones: 0.18.2, 0.18.1 Apr 27, 2016
@jreback jreback modified the milestones: 0.18.1, 0.18.2 Apr 30, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue May 1, 2016
Augment pandas array-like methods with appropriate parameters
(generally, '*args' and '**kwargs') so that they can be called
via analogous functions in the numpy library they are defined in
'fromnumeric.py'.

Closes pandas-devgh-12638.
Closes pandas-devgh-12644.
Closes pandas-devgh-12687.
@jreback jreback closed this as completed in 23eb483 May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

No branches or pull requests

3 participants