add Map.rename_axes
@@ -132,6 +132,25 @@ class Map(abc.ABC):
self.data = val.value
self._unit = val.unit
+ def rename_axes(self, names, new_names):
+ """Rename the Map axes.
+
+ Parameters
+ ----------
+ names : list or str
+ Names of the axes.
+ new_names : list or str
+ New names of the axes (list must be of same length than `names`).
+
+ Returns
+ -------
+ geom : `~Map`
+ Renamed Map.
+ """
+ map_copy = self.copy()
+ map_copy._geom = map_copy.geom.rename_axes(names, new_names)
+ return map_copy
+
@staticmethod
def create(**kwargs):
"""Create an empty map object.
