Skip to content

Commit 1807e08

Browse files
DOC: add explanation of dtype to parameter values for np.append
1 parent 148db64 commit 1807e08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

numpy/lib/_function_base_impl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5715,7 +5715,10 @@ def append(arr, values, axis=None):
57155715
These values are appended to a copy of `arr`. It must be of the
57165716
correct shape (the same shape as `arr`, excluding `axis`). If
57175717
`axis` is not specified, `values` can be any shape and will be
5718-
flattened before use.
5718+
flattened before use. If dtype of values is different from the
5719+
dtype of arr then their dtypes are compared to figure out the
5720+
common dtype they can both be safely coerced to. For e.g. `int64`
5721+
and `float64` can both go to `float64`.
57195722
axis : int, optional
57205723
The axis along which `values` are appended. If `axis` is not
57215724
given, both `arr` and `values` are flattened before use.

0 commit comments

Comments
 (0)