Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

H5ML.get_mem_datatype

Data type for dataset ID

Syntax

DTYPE_ID = H5ML.get_mem_datatype(LOCATION_ID)

Description

DTYPE_ID = H5ML.get_mem_datatype(LOCATION_ID) returns the ID of an HDF5 memory datatype for the dataset or attribute identified by LOCATION_ID. This HDF5 memory datatype is the default used by H5D.read or H5D.write when you specify 'H5ML_DEFAULT' as a value of the memory data type parameter.

The identifier returned by H5ML.get_mem_datatype should eventually be closed by calling H5T.close to release resources.

Examples

file_id = H5F.open('example.h5','H5F_ACC_RDONLY','H5P_DEFAULT');
dset_id = H5D.open(file_id,'/g1/g1.1/dset1.1.1');
datatype_id = H5ML.get_mem_datatype(dset_id)
H5T.close(datatype_id);
H5D.close(dset_id);
H5F.close(file_id);
Was this topic helpful?