Package netCDF4 :: Module _netCDF4 :: Class Dimension
[hide private]
[frames] | no frames]

Class Dimension

object --+
         |
        Dimension

A netCDF `netCDF4.Dimension` is used to describe the coordinates of a `netCDF4.Variable`. See `netCDF4.Dimension.__init__` for more details.

The current maximum size of a `netCDF4.Dimension` instance can be obtained by calling the python `len` function on the `netCDF4.Dimension` instance. The `netCDF4.Dimension.isunlimited` method of a `netCDF4.Dimension` instance can be used to determine if the dimension is unlimited.

Read-only class variables:

**`name`**: String name, used when creating a `netCDF4.Variable` with `netCDF4.Dataset.createVariable`.

Instance Methods [hide private]
 
__init__(...)
**`__init__(self, group, name, size=None)`**
 
__len__(x)
len(x)
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__repr__(x)
repr(x)
 
__unicode__(...)
 
_getname(...)
 
group(...)
**`group(self)`**
 
isunlimited(...)
**`isunlimited(self)`**

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  _data_model
  _dimid
  _grp
  _grpid
  _name
  name
string name of Dimension instance

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

**`__init__(self, group, name, size=None)`**

`netCDF4.Dimension` constructor.

**`group`**: `netCDF4.Group` instance to associate with dimension.

**`name`**: Name of the dimension.

**`size`**: Size of the dimension. `None` or 0 means unlimited. (Default `None`).

***Note***: `netCDF4.Dimension` instances should be created using the `netCDF4.Dataset.createDimension` method of a `netCDF4.Group` or `netCDF4.Dataset` instance, not using `netCDF4.Dimension.__init__` directly.

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(x)
(Representation operator)

 

repr(x)

Overrides: object.__repr__

group(...)

 

**`group(self)`**

return the group that this `netCDF4.Dimension` is a member of.

isunlimited(...)

 

**`isunlimited(self)`**

returns `True` if the `netCDF4.Dimension` instance is unlimited, `False` otherwise.