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

Improve docstrings for vec and reshape #27027

Merged
merged 2 commits into from
May 8, 2018
Merged

Improve docstrings for vec and reshape #27027

merged 2 commits into from
May 8, 2018

Conversation

nalimilan
Copy link
Member

Document mutability behavior, add examples with ranges and fix a few issues.

Cc @mbauman (about #26775 (comment)).

Document mutability behavior, add examples with ranges and fix a few issues.
@nalimilan nalimilan added docs This change adds or pertains to documentation arrays [a, r, r, a, y, s] labels May 7, 2018
@mbauman
Copy link
Member

mbauman commented May 7, 2018

CC @StephenVavasis — I should have looked at the docstring myself in #27001! Would you mind reviewing the new wordings and verify that this would have helped your understanding there?

@StephenVavasis
Copy link
Contributor

Looks good to me-- thanks for fixing this.

Reshape the array `a` as a one-dimensional column vector. Return `a` if it is
already an `AbstractVector`. The resulting array
shares the same underlying data as `a`, so it will only be mutable if `a` is
mutable, and in that case modifying one will also modify the other.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps "and in that case" --> "in which case"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, done.

@mbauman mbauman merged commit 024bfdb into master May 8, 2018
@mbauman mbauman deleted the nl/vecdocs branch May 8, 2018 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants