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: note in h/v/dstack points users to stack/concatenate #7253

Merged
merged 2 commits into from
Feb 16, 2016

Conversation

aukejw
Copy link
Contributor

@aukejw aukejw commented Feb 15, 2016

Warns users that they should be using stack and concatenate rather than the *stack functions. Discussion at #5605 shows why using stack/concatenate should be preferred (in particular this comment).

Also see the discussion at #7183, and previous PR #7191.

@shoyer something along these lines is what you had in mind, right? Please let me know if this is the correct location for this message (it could also be placed under Notes), and whether it is sufficiently explicit.

@@ -184,6 +184,10 @@ def vstack(tup):
Take a sequence of arrays and stack them vertically to make a single
array. Rebuild arrays divided by `vsplit`.

This function continues to be supported for backward compatibility, but
you should prefer ``np.concatenate`` or ``np.stack`` (keep in mind that
``np.stack`` was added in numpy version 1.10).
Copy link
Member

Choose a reason for hiding this comment

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

How about a simple, unparnthesized,

The ``np.stack`` function was added in NumPy 1.10.

or maybe

or the ``np.stack`` function added in numpy 1.10.

Copy link
Member

Choose a reason for hiding this comment

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

@charris I like your first suggestion:

This function continues to be supported for backward compatibility, but
you should prefer ``np.concatenate`` or ``np.stack``. The ``np.stack``
function was added in NumPy 1.10.

@charris
Copy link
Member

charris commented Feb 16, 2016

For commits where the changes don't get tested, add [ci skip] to the commit message.

@aukejw
Copy link
Contributor Author

aukejw commented Feb 16, 2016

Clever. I didn't see it anywhere in the dev workflow and I wasn't familiar with Travis' customization options. I'll remember it for a next time, thanks.

charris added a commit that referenced this pull request Feb 16, 2016
DOC: note in h/v/dstack points users to stack/concatenate
@charris charris merged commit f4cc58c into numpy:master Feb 16, 2016
@eric-wieser
Copy link
Member

Should we be doing the same for vsplit, hsplit, and dsplit?

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

4 participants