Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.ma.append

numpy.ma.append(a,b,axis=None)[source]

Append values to the end of an array.

New in version 1.9.0.

Parameters:
a:array_like

Values are appended to a copy of this array.

b:array_like

These values are appended to a copy ofa. It must be of thecorrect shape (the same shape asa, excludingaxis). Ifaxisis not specified,b can be any shape and will be flattenedbefore use.

axis:int, optional

The axis along whichv are appended. Ifaxis is not given,botha andb are flattened before use.

Returns:
append:MaskedArray

A copy ofa withb appended toaxis. Note thatappenddoes not occur in-place: a new array is allocated and filled. Ifaxis is None, the result is a flattened array.

See also

numpy.append
Equivalent function in the top-level NumPy module.

Examples

>>>importnumpy.maasma>>>a=ma.masked_values([1,2,3],2)>>>b=ma.masked_values([[4,5,6],[7,8,9]],7)>>>print(ma.append(a,b))[1 -- 3 4 5 6 -- 8 9]

Previous topic

numpy.ma.vstack

Next topic

numpy.ma.make_mask

Quick search

  • © Copyright 2008-2018, The SciPy community.
  • Last updated on Jul 24, 2018.
  • Created usingSphinx 1.6.6.

[8]ページ先頭

©2009-2025 Movatter.jp