Skip to content
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

DOC: The axis argument of average can be a tuple of ints #8611

Merged
merged 1 commit into from
Feb 14, 2017

Conversation

cancan101
Copy link
Contributor

Closes #8604

@charris charris changed the title Update docs for average to indicate that axis may be a tuple of ints DOC: Update docs for average to indicate that axis may be a tuple of ints Feb 12, 2017
@charris charris changed the title DOC: Update docs for average to indicate that axis may be a tuple of ints DOC: The axis argument of average can be a tuple of ints Feb 12, 2017
axis : int or tuple of ints, optional
Axis or axes along which to average `a`. If `None`, averaging is done
over the flattened array.
If this is a tuple of ints, averaging is performed over multiple axes,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a single paragraph, i.e., combined with preceding line. I'd cut and paste from the corresponding part of the sum docstring with relevant changes to have a more complete explanation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the .. versionadded:: found in sum would also be correct here. I'd feel happier if this functionality was tested :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from:

axis : None or int or tuple of ints, optional
Axis or axes along which the means are computed. The default is to
compute the mean of the flattened array.
.. versionadded:: 1.7.0
If this is a tuple of ints, a mean is performed over multiple axes,
instead of a single axis or all the axes as before.
.

Do you like the mean formatting or the sum formatting?

I wasn't sure of what version added to use. I can use .. versionadded:: 1.7.0 if you want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that version is probably correct as the functionality seems more inherited than intentional. The sum docs seem a bit better to me with regard to the tuple.

@charris
Copy link
Member

charris commented Feb 12, 2017

See doc/source/def/gitwash/development_workflow.rst for guidelines on commit message formatting.

@cancan101
Copy link
Contributor Author

fixed

@charris charris merged commit bbd5a77 into numpy:master Feb 14, 2017
@charris
Copy link
Member

charris commented Feb 14, 2017

Thanks @cancan101 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants