MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __copy__

Method __copy__

lib/matplotlib/colors.py:853–859  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

851 return rgba, mask_bad
852
853 def __copy__(self):
854 cls = self.__class__
855 cmapobject = cls.__new__(cls)
856 cmapobject.__dict__.update(self.__dict__)
857 if self._isinit:
858 cmapobject._lut = np.copy(self._lut)
859 return cmapobject
860
861 def __eq__(self, other):
862 if (not isinstance(other, Colormap) or

Callers 1

copyMethod · 0.95

Calls 3

__new__Method · 0.45
updateMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected