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

Method __eq__

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

Source from the content-addressed store, hash-verified

1862 return cmapobject
1863
1864 def __eq__(self, other):
1865 if not isinstance(other, BivarColormap):
1866 return False
1867 # To compare lookup tables the Colormaps have to be initialized
1868 if not self._isinit:
1869 self._init()
1870 if not other._isinit:
1871 other._init()
1872 if not np.array_equal(self._lut, other._lut):
1873 return False
1874 if not np.array_equal(self._rgba_bad, other._rgba_bad):
1875 return False
1876 if not np.array_equal(self._rgba_outside, other._rgba_outside):
1877 return False
1878 if self.shape != other.shape:
1879 return False
1880 return True
1881
1882 def get_bad(self):
1883 """Get the color for masked values."""

Callers

nothing calls this directly

Calls 2

_initMethod · 0.95
_initMethod · 0.45

Tested by

no test coverage detected