I have saved a 2D matrix in a numpy file (.npy) in python.
Is there a way I can access the same from C++ and possibly read in the values in a stl vector?

This is vaguely relevant. But here you make the call from python. I want to read the matrix file independently in c++.

Any suggestions?

Recommended Answers

All 3 Replies

Yeah I had seen that. I was really trying to avoid parsing a binary file.
But thanks anyway!

Ok I think the easiest solution is to save it as a csv file and read it from c++. This avoids the confusion of reading in binary files!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.