question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOC: Rename `*args` param in `f_oneway` to `*samples`

See original GitHub issue

The current signature for the f_oneway function in the stats module reads:

def f_oneway(*args, axis=0):

which does not provide any real clarity, imo.

My suggestion is to refactor the *args param to *samples, or *samps—whatever form is more agreeable. The docstring itself uses sample:

sample1, sample2, … : array_like

Of course anyone calling this function would have an idea of what the function would accept; nevertheless, I think this would add value at zero cost (just a refactor within the function).

Untitled

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tupuicommented, Jan 3, 2022

Sure—happy to 👍 Should I do the other functions as well? @kruskal, levene, bartlett, fligner

I would say so.

Regarding the docstrings: couldn’t find anything wrong with them, but maybe I’m overlooking something?

sample1, sample2, … : array_like *args : tuple of array_like

These are the two formats I found; do we prefer the second form, or the first (*when the param is a arg)

I would go with the second form *samples : tuple of array_like. It’s what numpydoc says.

Had one question on the tests before submitting the PR—I’ve already run the entire test suite once today; after the change, is it sufficient to run python[3] runtests.py -v --submodule stats? Or is it required to rerun the entire suite before pushing?

Thanks for asking! The more you test locally the better as you could limit CI usage. Still, it’s usually fine to just run the tests of the module you are touching. Of course, some functions are used in other modules and it might be disruptive. But it’s ok and the CI will catch this. Something that is more important I would say would be to skip some CI if you just change the doc for instance (cf CI doc on our dev doc).

1reaction
tupuicommented, Jan 2, 2022

Thanks for reporting @ShivnarenSrinivasan! Seems like a good idea and the docstrings would also need an update. samples seems more appropriate. We should avoid truncating words like this. Would you like to make a PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

scipy.stats.f_oneway — SciPy v1.9.3 Manual
The test is applied to samples from two or more groups, possibly with differing sizes. Parameters. sample1, sample2, …array_like. The sample measurements for ......
Read more >
Customize your pipeline - Azure Pipelines - Microsoft Learn
Step-by-step tutorial to customize a pipeline.
Read more >
swaptomostacks
NAME swaptomostacks - Exchange tilt series files for making tomogram with same parameters · SYNOPSIS swaptomostacks -from otherRoot -to saveRoot [options] ...
Read more >
Designing with Parameters in Autodesk Inventor - PDH Online
Inventor 2010 is used in this course to illustrate examples, but the concepts ... We can rename all three parameters which define the...
Read more >
Effective Go - The Go Programming Language
Named result parameters. The return or result "parameters" of a Go function can be given names and used as regular variables, just like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found