This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / ma / core / concatenate

staticmethod

numpy.ma.core:concatenate

source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :7297

Signature

staticmethod def   concatenate ( arrays axis = 0 )

Summary

Concatenate a sequence of arrays along the given axis.

Parameters

arrays : sequence of array_like

The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default).

axis : int, optional

The axis along which the arrays will be joined. Default is 0.

Returns

result : MaskedArray

The concatenated array with any masked entries preserved.

Examples

import numpy as np
import numpy.ma as ma
a = ma.arange(3)
a[1] = ma.masked
b = ma.arange(2, 5)
a
b
ma.concatenate([a, b])

See also

numpy.concatenate

Equivalent function in the top-level NumPy module.

Aliases

  • numpy.ma.concatenate
  • numpy.ma.extras.MAxisConcatenator.concatenate