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

Method __copy__

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

Source from the content-addressed store, hash-verified

1537 return self.__copy__()
1538
1539 def __copy__(self):
1540 cls = self.__class__
1541 cmapobject = cls.__new__(cls)
1542 cmapobject.__dict__.update(self.__dict__)
1543 cmapobject._colormaps = [cm.copy() for cm in self._colormaps]
1544 cmapobject._rgba_bad = np.copy(self._rgba_bad)
1545 return cmapobject
1546
1547 def __eq__(self, other):
1548 if not isinstance(other, MultivarColormap):

Callers 1

copyMethod · 0.95

Calls 3

__new__Method · 0.45
updateMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected