def tuple_equal(x, y): """Check tuples for equality. Args: x (tuple): First tuple. y (tuple): Second tuple. Returns: bool: `x` and `y` are equal. """ return len(x) == len(y) and \ all([B.shape(xi) == B.shape(yi) and B.all_bool(xi == yi) for xi, yi in zip(x, y)])
def __eq__(self, other): return B.all_bool(self.alpha == other.alpha)
def __eq__(self, other): return self[0] == other[0] and B.all_bool(self.period == other.period)
def __eq__(self, other): return B.all_bool(self.alpha == other.alpha) and \ B.all_bool(self.beta == other.beta)
def __eq__(self, other): return B.all_bool(self.scale == other.scale) and self[0] == other[0]