reshape

final ComplexMatrix reshape(Integer newRows, Integer newCols)

Reshape this matrix. From the current shape, it is possible to estimate the -1 part among the parameters. One or less -1 is allowed.

This function does the same thing as Tensor.reshape (intArrayOf(newRows, newCols)) except for that it returns Matrix.

Return

a new matrix with newRows rows and newCols columns.

Parameters

newRows

a new number of rows.

newCols

a new number of columns.