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

Method __eq__

lib/matplotlib/colors.py:861–868  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

859 return cmapobject
860
861 def __eq__(self, other):
862 if (not isinstance(other, Colormap) or
863 self.colorbar_extend != other.colorbar_extend):
864 return False
865 # To compare lookup tables the Colormaps have to be initialized
866 self._ensure_inited()
867 other._ensure_inited()
868 return np.array_equal(self._lut, other._lut)
869
870 def get_bad(self):
871 """Get the color for masked values."""

Callers

nothing calls this directly

Calls 1

_ensure_initedMethod · 0.95

Tested by

no test coverage detected