Skip to content

DOC: Recommend adding dimension to switch between row and column vectors #12973

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

Merged
merged 3 commits into from
Feb 22, 2019
Merged

DOC: Recommend adding dimension to switch between row and column vectors #12973

merged 3 commits into from
Feb 22, 2019

Conversation

iansan5653
Copy link
Contributor

@iansan5653 iansan5653 commented Feb 15, 2019

@charris charris changed the title Recommend using reshape instead of matrix to switch between row and column vectors DOC: Recommend reshape instead of matrix to switch between row and column vectors Feb 15, 2019
@charris charris changed the title DOC: Recommend reshape instead of matrix to switch between row and column vectors DOC: Recommend reshape instead of matrix to switch row and column vectors Feb 15, 2019
@charris charris changed the title DOC: Recommend reshape instead of matrix to switch row and column vectors DOC: Recommend reshape to switch between row and column vectors Feb 15, 2019
@eric-wieser
Copy link
Member

Perhaps something like:

To convert a 1d array into a 2d column vector, an extra dimension must be added. np.atleast2d(a).T achieves this, as does a[:, np.newaxis]

@seberg
Copy link
Member

seberg commented Feb 21, 2019

@iansan5653 could you rephrase it more like Eric suggested?

Recommend adding a dimension instead of using `reshape`.
Per @eric-wieser, makes explanation more technical.
@iansan5653 iansan5653 changed the title DOC: Recommend reshape to switch between row and column vectors DOC: Recommend adding dimension to switch between row and column vectors Feb 22, 2019
@seberg
Copy link
Member

seberg commented Feb 22, 2019

Reads fine to me thanks @iansan5653.

@seberg seberg merged commit 04b4220 into numpy:master Feb 22, 2019
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.

4 participants