MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / load_matrix

Function load_matrix

src/Misc/MatrixIO.h:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29 template<typename Derived>
30 Derived load_matrix(const std::string& filename) {
31 std::vector<int> shape;
32 std::vector<typename Derived::Scalar> data;
33 aoba::LoadArrayFromNumpy(filename, shape, data);
34 assert(shape.size() == 2);
35
36 Derived M(shape[0], shape[1]);
37 std::copy(data.begin(), data.end(), M.data());
38 return M;
39 }
40}
41}

Callers

nothing calls this directly

Calls 4

LoadArrayFromNumpyFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected