H5A.get_space

Copy of attribute data space

Syntax

dspace_id = H5A.get_space(attr_id)

Description

dspace_id = H5A.get_space(attr_id) returns a copy of the data space for the attribute specified by attr_id.

Examples

Retrieve the dimensions of an attribute data space.

fid = H5F.open('example.h5');
attr_id = H5A.open(fid,'attr2');
space = H5A.get_space(attr_id);
[~,dims] = H5S.get_simple_extent_dims(space);
H5A.close(attr_id);
H5F.close(fid);