cf.Data.change_dimension_names

Data.change_dimension_names(dim_name_map)[source]

Change the dimension names.

The dimension names are arbitrary, so mapping them to another arbitrary collection does not change the data array values, units, dimension directions nor dimension order.

Examples

>>> d.dimensions
['dim0', 'dim1', 'dim2']
>>> dim_name_map
{'dim0': 'dim1',
 'dim1': 'dim0',
 'dim2': 'dim2',
 'dim3': 'dim3'}
>>> d.change_dimension_names(dim_name_map)
>>> d.dimensions
['dim1', 'dim0', 'dim2']

Previous topic

cf.Data.add_partitions

Next topic

cf.Data.chunk

This Page