Skip to content

Commit e02cb02

Browse files
DOC: enhanced example with c.dtype [skip azp][skip cirrus][skip actions]
1 parent 0489082 commit e02cb02

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
@@ -5760,8 +5760,11 @@ def append(arr, values, axis=None):
57605760
57615761
>>> a = np.array([1, 2], dtype=int)
57625762
>>> b = []
5763-
>>> np.append(a, b)
5763+
>>> c = np.append(a, b)
5764+
>>> c
57645765
array([1., 2.])
5766+
>>> c.dtype
5767+
float64
57655768
57665769
Default dtype for empty lists is `float64` thus making the output of dtype
57675770
`float64` when appended with dtype `int64`

0 commit comments

Comments
 (0)