10000 DOC: add explanation of dtype to parameter values for np.append by tuhinsharma121 · Pull Request #26303 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: add explanation of dtype to parameter values for np.append #26303

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 6 commits into from
Apr 22, 2024
5 changes: 4 additions & 1 deletion numpy/lib/_function_base_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5715,7 +5715,10 @@ def append(arr, values, axis=None):
These values are appended to a copy of `arr`. It must be of the
correct shape (the same shape as `arr`, excluding `axis`). If
`axis` is not specified, `values` can be any shape and will be
flattened before use.
flattened before use. If dtype of values is different from the
dtype of arr then their dtypes are compared to figure out the
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
flattened before use. If dtype of values is different from the
dtype of arr then their dtypes are compared to figure out the
flattened before use. If dtype of `values` is different from the
dtype of `arr` then their dtypes are compared to figure out the

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed now.

common dtype they can both be safely coerced to. For e.g. `int64`
and `float64` can both go to `float64`.
axis : int, optional
The axis along which `values` are appended. If `axis` is not
given, both `arr` and `values` are flattened before use.
Expand Down
0