added __iadd__ method

This commit is contained in:
Philip Eisenlohr 2020-07-02 10:26:04 -04:00
parent f3ff2e7412
commit 5a96708f41
1 changed files with 1 additions and 2 deletions

View File

@ -26,8 +26,7 @@ class Colormap(mpl.colors.ListedColormap):
def __iadd__(self,other):
"""Concatenate colormaps."""
return Colormap(np.vstack((self.colors,other.colors)),
f'{self.name}+{other.name}')
return self.__add__(other)
def __invert__(self):
"""Return inverted colormap."""