code: public static DenseMatrix matrix(double[][] A) {
          if (nlmatrixZeros != null) {
              try {
                  return (DenseMatrix) nlmatrixArray2D.newInstance((Object) A);
              } catch (Exception e) {
                  logger.error("Failed to call NLMatrix(double[][]): {}", e);
              }
          }
  
          return new JMatrix(A);
      }
docs: Creates a matrix initialized by A.