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

Method __copy__

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

Source from the content-addressed store, hash-verified

1850 return lut
1851
1852 def __copy__(self):
1853 cls = self.__class__
1854 cmapobject = cls.__new__(cls)
1855 cmapobject.__dict__.update(self.__dict__)
1856
1857 cmapobject._rgba_outside = np.copy(self._rgba_outside)
1858 cmapobject._rgba_bad = np.copy(self._rgba_bad)
1859 cmapobject._shape = self.shape
1860 if self._isinit:
1861 cmapobject._lut = np.copy(self._lut)
1862 return cmapobject
1863
1864 def __eq__(self, other):
1865 if not isinstance(other, BivarColormap):

Callers 1

copyMethod · 0.95

Calls 3

__new__Method · 0.45
updateMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected