cf.Data.new_axis_identifier

Data.new_axis_identifier(existing_axes=None)[source]

Return an axis name not being used by the data array.

The returned axis name will also not be referenced by partitions of the partition matrix.

Parameters :

existing_axes : sequence

Returns :
out : str

The new axis name.

Examples

>>> d.all_axis_names()   
['dim1', 'dim0']
>>> d.new_axis_identifier()
'dim2'
>>> d.all_axis_names()   
['dim1', 'dim0', 'dim3']
>>> d.new_axis_identifier()
'dim4'
>>> d.all_axis_names()   
['dim5', 'dim6', 'dim7']
>>> d.new_axis_identifier()
'dim3'

Previous topic

cf.Data.ndindex

Next topic

cf.Data.override_calendar

This Page