Пример #1
0
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)])
Пример #2
0
 def __eq__(self, other):
     return B.all_bool(self.alpha == other.alpha)
Пример #3
0
 def __eq__(self, other):
     return self[0] == other[0] and B.all_bool(self.period == other.period)
Пример #4
0
 def __eq__(self, other):
     return B.all_bool(self.alpha == other.alpha) and \
            B.all_bool(self.beta == other.beta)
Пример #5
0
 def __eq__(self, other):
     return B.all_bool(self.scale == other.scale) and self[0] == other[0]