larray.Axis.rename

Axis.rename(name) Axis[source]

Rename the axis.

Parameters
namestr

the new name for the axis.

Returns
Axis

a new Axis with the same labels but a different name.

Examples

>>> sex = Axis('sex=M,F')
>>> sex
Axis(['M', 'F'], 'sex')
>>> sex.rename('gender')
Axis(['M', 'F'], 'gender')