Skip to content

Removed unnecessary params in cum_func #13550

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
wants to merge 1 commit into from

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Jul 2, 2016

Picks up from #13167 by properly removing the parameters and ensuring that numpy compatibility has been maintained. The current test suite does a good job of checking that already, so no tests were added.

Closes #13541.

@codecov-io
Copy link

codecov-io commented Jul 2, 2016

Current coverage is 84.34%

Merging #13550 into master will increase coverage by <.01%

@@             master     #13550   diff @@
==========================================
  Files           138        138          
  Lines         51113      51119     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43109      43115     +6   
  Misses         8004       8004          
  Partials          0          0          

Powered by Codecov. Last updated by a01644c...6ba7a77

@jorisvandenbossche jorisvandenbossche added the Compat pandas objects compatability with Numpy or Python functions label Jul 3, 2016
@jorisvandenbossche jorisvandenbossche added this to the 0.18.2 milestone Jul 3, 2016
@jorisvandenbossche
Copy link
Member

Looks good to me!

@jreback
Copy link
Contributor

jreback commented Jul 3, 2016

do need a test for this?
as prior treats didn't catch this

@gfyoung
Copy link
Member Author

gfyoung commented Jul 3, 2016

Catch what? We already have tests in fact to ensure that the numpy call won't break as well as one for non-default arguments in test_generic.py.

@jreback
Copy link
Contributor

jreback commented Jul 3, 2016

what I mean is I suspect we have more functions that have named numpy args - they work but we are specifically naming them

@gfyoung
Copy link
Member Author

gfyoung commented Jul 3, 2016

AFAIU cum_func is a template for all of the accumulation functions for DataFrame and Series at the very least. What other functions are you referring to?

@jreback
Copy link
Contributor

jreback commented Jul 3, 2016

no my point is that there might be others that accept the dtype argument (or out) and yet are validated, but we really should remove the actual named arguments. This one was not caught, so there might be others. You might have to inspect them manually. Not sure you can tell the difference between a named arg and a kwarg once your function sees it.

@gfyoung
Copy link
Member Author

gfyoung commented Jul 3, 2016

@jreback : GitHub search indicates that out=None is essentially nonexistent in the code-base except for cum_func, algorithms.py and function.py (my numpy compat module).

However, the same cannot be said with dtype=None. Manual inspection of every dtype=None? That's just being ridiculous.

Fortunately, a GitHub search indicates that all other instances of dtype=None are called from functions that I know definitely do not exist in numpy, so I think we are good to go on that.

@jreback
Copy link
Contributor

jreback commented Jul 3, 2016

ok, then lgtm. yeah the out in algorithms.py is ok.

@jreback jreback closed this in ffb582c Jul 3, 2016
@gfyoung gfyoung deleted the cum-func-cleanup branch July 3, 2016 23:24
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

Successfully merging this pull request may close these issues.

4 participants