Databases Reference
In-Depth Information
$ h5ls -vlr demo.hdf5
/ Group
Location: 1:96
Links: 1
/array Dataset {10/10}
Location: 1:1400
Links: 1
Storage: 40 logical bytes, 40 allocated bytes, 100.00% utilization
Type: native int
/group Group
Location: 1:1672
Links: 1
/group/subarray Dataset {2/2, 2/2}
Location: 1:1832
Links: 1
Storage: 16 logical bytes, 16 allocated bytes, 100.00% utilization
Type: native int
/scalar Dataset {SCALAR}
Location: 1:800
Links: 1
Storage: 4 logical bytes, 4 allocated bytes, 100.00% utilization
Type: native int
That's a little more useful. We can see that the object at /array is of type “native int,”
and is a 1D array 10 elements long. Likewise, there's a dataset inside the group named
group that is 2D, also of type native int.
h5ls is great for inspecting metadata like this. There's also a program called h5dump ,
which prints data as well, although in a more verbose format:
$ h5dump demo.hdf5
HDF5 "demo.hdf5" {
GROUP "/" {
DATASET "array" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
DATA {
(0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
}
}
GROUP "group" {
DATASET "subarray" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 2, 2 ) / ( 2, 2 ) }
DATA {
(0,0): 2, 2,
(1,0): 2, 2
}
}
}
DATASET "scalar" {
DATATYPE H5T_STD_I32LE
Search WWH ::




Custom Search