bundles / numpy latest / numpy / ma / core / append
function
numpy.ma.core:append
source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :8890
Signature
def append ( a , b , axis = None ) Summary
Append values to the end of an array.
Parameters
a: array_likeValues are appended to a copy of this array.
b: array_likeThese values are appended to a copy of
a. It must be of the correct shape (the same shape asa, excludingaxis). Ifaxisis not specified,bcan be any shape and will be flattened before use.axis: int, optionalThe axis along which
vare appended. Ifaxisis not given, bothaandbare flattened before use.
Returns
append: MaskedArrayA copy of
awithbappended toaxis. Note that append does not occur in-place: a new array is allocated and filled. Ifaxisis None, the result is a flattened array.
Examples
import numpy as np 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)
See also
- numpy.append
Equivalent function in the top-level NumPy module.
Aliases
-
numpy.ma.append