numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturns
append(a, b, axis=None)
versionadded

Parameters

a : array_like

Values are appended to a copy of this array.

b : array_like

These values are appended to a copy of a. It must be of the correct shape (the same shape as a, excluding :None:None:`axis`). If :None:None:`axis` is not specified, b can be any shape and will be flattened before use.

axis : int, optional

The axis along which :None:None:`v` are appended. If :None:None:`axis` is not given, both a and b are flattened before use.

Returns

append : MaskedArray

A copy of a with b appended to :None:None:`axis`. Note that append does not occur in-place: a new array is allocated and filled. If :None:None:`axis` is None, the result is a flattened array.

Append values to the end of an array.

See Also

numpy.append

Equivalent function in the top-level NumPy module.

Examples

This example is valid syntax, but we were not able to check execution
>>> import numpy.ma as ma
... a = ma.masked_values([1, 2, 3], 2)
... b = ma.masked_values([[4, 5, 6], [7, 8, 9]], 7)
... ma.append(a, b) masked_array(data=[1, --, 3, 4, 5, 6, --, 8, 9], mask=[False, True, False, False, False, False, True, False, False], fill_value=999999)
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/ma/core.py#8243
type: <class 'function'>
Commit: