Skip to content

How can I store data in a file and extract in a matrix form later? #39

Discussion options

You must be logged in to vote

If you want to store the results on the hard drive, it might be best to use a FileStorage instead of the MemoryStorage in your code. py-pde will then store the results in an hdf5 file which you can read either by initializing a pde.FileStorage with it or by just reading it using h5py. Note that the information about the grid (and thus the discretization) is stored in a hdf attribute and might be difficult to reconstruct manually. I thus suggest initializing the storage using py-pde again and then access the data using the data attribute. The underlying grid can be accessed using the grid attribute. In particular, you get information about the discretization using the axes_coords or cell_c…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ShaikhaTheGreen
Comment options

@david-zwicker
Comment options

Answer selected by ShaikhaTheGreen
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #38 on January 27, 2021 11:30.