spectrochempy.stack¶
- stack(*datasets)[source]¶
Stack of
NDDataset
objects along a new dimension.Any number of
NDDataset
objects can be stacked. For this operation to be defined the following must be true :all inputs must be valid dataset objects,
units of data and axis must be compatible (rescaling is applied automatically if necessary).
- Parameters
*datasets (a series of |NDDataset|) – The dataset to be stacked to the current dataset.
- Returns
out – A
NDDataset
created from the stack of thedatasets
datasets.
See also
concatenate
Concatenate
NDDataset
objects along a given dimension.
Examples
>>> A = scp.read('irdata/nh4y-activation.spg', protocol='omnic') >>> B = scp.read('irdata/nh4y-activation.scp') >>> C = scp.stack(A, B) >>> print(C) NDDataset: [float64] a.u. (shape: (z:2, y:55, x:5549))