8000 DOC: add vstack, hstack, dstack reference to stack documentation. by aukejw · Pull Request #7191 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: add vstack, hstack, dstack reference to stack documentation. #7191

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 2 commits into from
Feb 5, 2016
Merged

DOC: add vstack, hstack, dstack reference to stack documentation. #7191

merged 2 commits into from
Feb 5, 2016

Conversation

aukejw
Copy link
Contributor
@aukejw aukejw commented Feb 5, 2016

See issue #7183.

@@ -304,6 +304,11 @@ def stack(arrays, axis=0):
See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
vstack : Stack arrays in sequence vertically, along the existing row axis.
Copy link
Contributor

Choose a reason for hiding this comment

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

"in sequence" is superfluous; "the existing" should be "an existing". Same applies to the other three additions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right about 'in sequence', I'll remove it -- it'll also fit on one line that way. There is only one 'row axis' though?

@madphysicist
Copy link
Contributor

To answer your earlier question:

>>> a = np.ones((2, 3, 4, 5, 6))
>>> b = np.ones((2, 3, 4, 5, 6))
>>> np.vstack((a, b)).shape
(4, 3, 4, 5, 6)
>>> np.hstack((a, b)).shape
(2, 6, 4, 5, 6)
>>> np.dstack((a, b)).shape
(2, 3, 8, 5, 6)

Row is always first axis, column is always second axis and depth is always third, no matter how many axes the array has.

@aukejw
Copy link
Contributor Author
aukejw commented Feb 5, 2016

Exactly, that's why I specified the axis as 'the' row axis, rather than 'an' axis. I'm no expert on the usage of definite vs indefinite articles though.. Thanks for the clarification!

@madphysicist
Copy link
Contributor

In that case you were probably correct. Sorry for making you change that.

@madphysicist
Copy link
Contributor

Perhaps you could say something like "... the existing row (first) axis ..."?

@shoyer
Copy link
Member
shoyer commented Feb 5, 2016

I commented in the original issue, but just be to clear I'm -1 on this change until it's resolved.

charris added a commit that referenced this pull request Feb 5, 2016
DOC: add vstack, hstack, dstack reference to stack documentation.
@charris charris merged commit 99cd634 into numpy:master Feb 5, 2016
@charris
Copy link
Member
charris commented Feb 5, 2016

Thanks @aukejw .

@shoyer
Copy link
Member
shoyer commented Feb 5, 2016

@charris I just said I'm -1 on this change! Can we revert?

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
0