I'm trying to load multiple vectors and matrices (for numpy) that are stored in a single text file. The file looks like this:
%VectorA
1 2 3 4
%MatrixA
1 2 3
4 5 6
%VectorB
3 4 5 6 7
The ideal solution would be to have a dictionary object like:
{'VectorB': [3, 4, 5, 6, 7], 'VectorA': [1, 2, 3, 4], 'MatrixA':[[1, 2, 3],[4, 5, 6]]}
The order of the variables can be assumed as fixed. So, a list of the numpy arrays in the order of appearance in the text file would also be okay.
numpy.loadandnumpy.save?picklemodule if it was from python to python.