code: @Override
      public INDArray getLFactor(INDArray A) {
          // FIXME: int cast
          if (A.rows() > Integer.MAX_VALUE || A.columns() > Integer.MAX_VALUE)
              throw new ND4JArraySizeException();
  
          int m = (int) A.rows();
          int n = (int) A.columns();
  
          INDArray L = Nd4j.create(m, n);
          for (int r = 0; r < m; r++) {
              for (int c = 0; c < n; c++) {
                  if (r > c && r < m && c < n) {
                      L.putScalar(r, c, A.getFloat(r, c));
                  } else if (r < c) {
                      L.putScalar(r, c, 0.f);
                  } else {
                      L.putScalar(r, c, 1.f);
                  }
              }
          }
          return L;
      }
docs: /* TODO: consider doing this in place to save memory. This implies U is taken out first
  L is the same shape as the input matrix. Just the lower triangular with a diagonal of 1s