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?

Re: Access Numpy matrix file in C++ 80 80

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

Re: Access Numpy matrix file in C++ 80 80

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 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.