Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104604
| From | dieter <dieter@handshake.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: HDF5 data set, unable to read contents |
| Date | 2016-03-11 10:37 +0100 |
| Message-ID | <mailman.12.1457689071.26429.python-list@python.org> (permalink) |
| References | <f8787852-6566-4ed5-a969-262372be243e@googlegroups.com> |
varun7rs@gmail.com writes: > I recently came across a package called matrix2latex which simplifies the creation of very large tables. So, I saved my data in .mat format using the '-v7.3' extension so that they can be read by python. > > Now, when I try to read these files, I'm having some problems in reproducing the whole matrix. Whenever I try and print out an element of the array, I only get 'HDF5 object reference' as the output. "print" implicitely converts an object to a string. As there are a huge number of potential object types, "print" itself cannot know all the relevant details regarding string convertion for all types -- each individual type must help (by defining "__str__" and/or "__repr__"). If it does not help, you get a printout as the above. In an interactive Python session, you can use "help(...)" on one of those "HDF5 object reference"s. This will show you the API of the object - i.e. how to interact with the object (such as accessing/modifying the contained information). "vars(...)" may also help (it shows the object's (instance) attributes).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
HDF5 data set, unable to read contents varun7rs@gmail.com - 2016-03-10 08:50 -0800 Re: HDF5 data set, unable to read contents dieter <dieter@handshake.de> - 2016-03-11 10:37 +0100 Re: HDF5 data set, unable to read contents Peter Otten <__peter__@web.de> - 2016-03-11 12:12 +0100
csiph-web