0

I'm trying to get a view of an existing matrix (INDArray) excluding one column.

Ex:
Original:
1|2|3
4|5|6
What I Want:
1|3
4|6

The Documentation shows how to take intervals of columns/rows but nothing about excluding arbitrary row/column.

Edit 1 (My Temporary solution):

INDArray matrix_ = Nd4j.create(matrix.columns(), matrix.rows() - 1);
    int j = 0;
    for (int i = 0; i < matrix.rows(); i++) {
      if (i != rowToDel){
          matrix_.putRow(j++, matrix.getRow(i));
      }
    }

0 Answers0