Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: improve clip docstring #8475

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 1 commit into from
Jan 16, 2017
Merged

DOC: improve clip docstring #8475

merged 1 commit into from
Jan 16, 2017

Conversation

befelix
Copy link
Contributor

@befelix befelix commented Jan 15, 2017

Following the discussion in #8471, this PR changes the clip docstring to make it clear that it can happen that the input array a is broadcasted to match the shape of a_min and a_max.

Example:

a = np.arange(5)[:, None]
a.clip([0, 0], [2, 2])

array([[0, 0],
       [1, 1],
       [2, 2],
       [2, 2],
       [2, 2]])

@charris
Copy link
Member

charris commented Jan 16, 2017

Cancelled appveyor tests, nothing gets tested here anyway.

@charris charris merged commit 305c302 into numpy:master Jan 16, 2017
@charris
Copy link
Member

charris commented Jan 16, 2017

Thanks @befelix .

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.

2 participants