vector<vector<double>> outtrans(out[0].size(), vector<double>(out.size())); for (size_t i = 0; i < out.size(); ++i) for (size_t j = 0; j < out[0].size(); ++j) outtrans[j][i] = out[i][j];