netCDF4.CompoundType

Module netCDF4 :: Class CompoundType |

# Class CompoundType

    object --+
             |
            CompoundType

A CompoundType instance is used to describe a compound data type.

Constructor: `CompoundType(group, datatype, datatype_name)`

Attention: When creating nested compound data types, the inner compound data types must already be associated with CompoundType instances (so create CompoundType instances for the innermost structures first).

CompoundType instances should be created using the createCompoundType method of a Dataset or Group instance, not using this class directly.

Parameters:

`group` - Group instance to associate with the compound datatype.

`datatype` - A numpy dtype object describing a structured (a.k.a record) array. Can be composed of homogeneous numeric or character data types, or other structured array data types.

`datatype_name` - a Python string containing a description of the compound data type.

Returns:

a CompoundType instance, which can be passed to the `createVariable` method of a Dataset or Group instance.

The instance variables `dtype` and `name` should not be modified by the user.

Instance Methods
__init__(...) x.__init__(...) initializes x; see help(type(x)) for signature |
a new object with type S, a subtype of T |
__new__(T, S, ...) |
__str__(x) str(x) |
__unicode__(...) |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Instance Variables
| dtype A numpy dtype object describing the compound data type.
| name A python string describing the compound type.

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(...) (Constructor) |
x.__init__(...) initializes x; see help(type(x)) for signature Overrides: object.__init__

### __new__(T, S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__

### __str__(x) (Informal representation operator) |
str(x) Overrides: object.__str__