code: public static DenseMatrix matrix(int nrows, int ncols) {
          if (nlmatrixZeros != null) {
              try {
                  return (DenseMatrix) nlmatrixZeros.newInstance(nrows, ncols);
              } catch (Exception e) {
                  logger.error("Failed to call NLMatrix(int, int): {}", e);
              }
          }
  
          return new JMatrix(nrows, ncols);
      }
docs: Creates a matrix of all zeros.