code: def equiv(self, other):
          
          if isinstance(other, ConstWeighting):
              return self == other
          elif isinstance(other, (ArrayWeighting, MatrixWeighting)):
              return other.equiv(self)
          else:
              return False
docs: Test if other is an equivalent weighting.
  
          Returns
          -------
          equivalent : bool
              ``True`` if other is a `Weighting` instance with the same
              `Weighting.impl`, which yields the same result as this
              weighting for any input, ``False`` otherwise. This is checked
              by entry-wise comparison of matrices/arrays/constants.