fatalaccidents 0 Newbie Poster

I have a question about h5py. I've read almost all of the tutorials online but I must be missing something. I'm wanting to read data from an h5 file that already exists.

Here is the first part of the file as it looks from being h5dump'ed just so you can see the groups:

1 HDF5 "file.h5" {
2 GROUP "/" {
3    ATTRIBUTE "npes" {
4       DATATYPE  H5T_STD_I32LE
5       DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
6       DATA {
7       (0): 8
8       }
9    }
10    GROUP "Data" {
11       GROUP "Flux" {
12          DATASET "0" {

I've tried something along these lines

import numpy
import h5

f = h5py.File('file.h5')
data_grp = f['Data']

This returns an error, as well as trying to create a group with that name.

How do I access the other groups in the file to be able to create the data sets from them? I'm completely lost here and feel like I'm missing something completely. Any help would be greatly appreciated.

Thanks!

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.