We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide tool to go from 1D to 2D array format
The text was updated successfully, but these errors were encountered:
Hello! mayby this can help
public double[][] toArray(SimpleMatrix matrix) { double array[][] = new double[matrix.numRows()][matrix.numCols()]; for (int r = 0; r < matrix.numRows(); r++) { array[r] = matrix.extractVector(true, r).getMatrix().getData(); } return array; }
or at DenseMatrix64F
public double[][] getData() { int count = 0; double[][] array = new double[this.numRows][this.numCols]; for (int i = 0; i < this.numRows; i++) { for (int j = 0; j < this.numCols; j++) { array[i][j] = this.data[count++]; } } return array; }
Regards
Sorry, something went wrong.
No branches or pull requests
Provide tool to go from 1D to 2D array format
The text was updated successfully, but these errors were encountered: