Skip to content

Commit 853c42b

Browse files
DOC: remove Notes section and refine Example [skip azp][skip cirrus][skip actions]
1 parent e02cb02 commit 853c42b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

numpy/lib/_function_base_impl.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5732,13 +5732,6 @@ def append(arr, values, axis=None):
57325732
insert : Insert elements into an array.
57335733
delete : Delete elements from an array.
57345734
5735-
Notes
5736-
-----
5737-
If dtype of `values` is different from the dtype of `arr` then
5738-
their dtypes are compared to figure out the common dtype they can
5739-
both be safely coerced to. For e.g. `int64` and `float64` can both
5740-
go to `float64`. See examples section below.
5741-
57425735
Examples
57435736
--------
57445737
>>> np.append([1, 2, 3], [[4, 5, 6], [7, 8, 9]])
@@ -5759,14 +5752,13 @@ def append(arr, values, axis=None):
57595752
dimension(s)
57605753
57615754
>>> a = np.array([1, 2], dtype=int)
5762-
>>> b = []
5763-
>>> c = np.append(a, b)
5755+
>>> c = np.append(a, [])
57645756
>>> c
57655757
array([1., 2.])
57665758
>>> c.dtype
57675759
float64
57685760
5769-
Default dtype for empty lists is `float64` thus making the output of dtype
5761+
Default dtype for empty ndarrays is `float64` thus making the output of dtype
57705762
`float64` when appended with dtype `int64`
57715763
57725764
"""

0 commit comments

Comments
 (0)