adelie.matrix.concatenate#

adelie.matrix.concatenate(mats: list, *, axis: int = 0, n_threads: int = 1)[source]#

Creates a concatenation of the matrices.

If mats represents a list of matrices \(X_1,\ldots, X_L\), then the resulting matrix represents the concatenated matrix along the given axis axis.

If axis=0, the matrix is concatenated row-wise:

\[\begin{split}\begin{align*} \begin{bmatrix} \unicode{x2014} & X_1 & \unicode{x2014} \\ \unicode{x2014} & X_2 & \unicode{x2014} \\ \vdots & \vdots & \vdots \\ \unicode{x2014} & X_L & \unicode{x2014} \end{bmatrix} \end{align*}\end{split}\]

If axis=1, the matrix is concatenated column-wise:

\[\begin{split}\begin{align*} \begin{bmatrix} \vert & \vert & \cdots & \vert \\ X_1 & X_2 & \cdots & X_L \\ \vert & \vert & \cdots & \vert \end{bmatrix} \end{align*}\end{split}\]

Note

This matrix only works for naive method!

Parameters:
matslist

List of matrices to concatenate.

axisint, optional

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

n_threadsint, optional

Number of threads. Default is 1.

Returns:
wrap

Wrapper matrix object.