Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-03-23 The HDF5 Field Guide

Loading...
Searching...
No Matches
Complex Datatypes
Datatypes (H5T)

## Detailed Description

## Functions
hid_t | H5Tcomplex_create (hid_t base_type_id)
| Creates a new complex number datatype.

## Function Documentation

## ◆ H5Tcomplex_create()

hid_t H5Tcomplex_create | ( | hid_t | base_type_id | ) |

Creates a new complex number datatype.

Parameters

  [in] | base_type_id | Datatype identifier, datatype identifier for the base datatype of the complex number datatype. Must be a floating-point datatype.

Returns
  Returns a complex number datatype identifier if successful; otherwise returns H5I_INVALID_HID.

H5Tcomplex_create() creates a new complex number datatype consisting of real and imaginary number parts. The datatype for both parts of the new complex number datatype is based on `base_type_id`, which must be a floating-point datatype.

When necessary, use H5Tget_super() to determine the base datatype of the complex number datatype.

The datatype identifier returned from this function should be released with H5Tclose() or resource leaks will result.

Since
  2.0.0