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

Skip to content

BUG: Fix #27256 and #27257 #27262

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
Aug 23, 2024
Merged

BUG: Fix #27256 and #27257 #27262

merged 1 commit into from
Aug 23, 2024

Conversation

mtsokol
Copy link
Member

@mtsokol mtsokol commented Aug 21, 2024

This PR addresses #27256 and #27257:

  • Re-allow to pass order as a positional or keyword argument in np.reshape.
  • Update np.fix docstring to include "no-casting to a floating data type" change.

To be backported to 2.1.x.

@WarrenWeckesser
Copy link
Member

The docstring of ceil also needs a fix; currently the "Returns" section describes the return value as "The ceiling of each element in x, with float dtype.":

Returns
-------
y : ndarray or scalar
The ceiling of each element in `x`, with `float` dtype.
$OUT_SCALAR_1

Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

It might be wise to also update the signature in the stubs
https://github.com/numpy/numpy/blob/main/numpy/_core/fromnumeric.pyi#L94-L107

@mtsokol
Copy link
Member Author

mtsokol commented Aug 21, 2024

The docstring of ceil also needs a fix; currently the "Returns" section describes the return value as "The ceiling of each element in x, with float dtype.":

Done!

It might be wise to also update the signature in the stubs https://github.com/numpy/numpy/blob/main/numpy/_core/fromnumeric.pyi#L94-L107

Also done!

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Aug 23, 2024
@charris charris merged commit ae926d7 into numpy:main Aug 23, 2024
66 checks passed
@charris
Copy link
Member

charris commented Aug 23, 2024

Thanks @mtsokol .

@mtsokol mtsokol deleted the bug-27256-27257 branch August 23, 2024 17:21
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 24, 2024
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.

DOC: Invalid docstring for numpy.fix (?) BUG: Unexpected breaking change in np.reshape on v2.1.0
4 participants