import numpy as np
from dascore.core.source import ArraySource
from dascore.core.lazy_array import LazyArray, concat
parts = [LazyArray.from_source(ArraySource.full((2, 3), x)) for x in (1, 2)]
joined = concat(parts, axis=1)
assert joined.shape == (2, 6)
expected = np.concatenate([x.load() for x in parts], axis=1)
assert np.array_equal(joined.load(), expected)concat
concat(
arrays: collections.abc.Sequence[LazyArray] ,
axis: int = 0,
)-> ‘LazyArray’
Join arrays end to end along one axis, in one pass over their members.
Parameters
| Parameter | Description |
|---|---|
| arrays | The arrays to join; they must agree on every other axis. |
| axis | The axis to join along. |