in botorch/models/transforms/input.py [0:0]
def equals(self, other: InputTransform) -> bool:
r"""Check if another input transform is equivalent.
Args:
other: Another input transform.
Returns:
A boolean indicating if the other transform is equivalent.
"""
if hasattr(self, "indices") == hasattr(other, "indices"):
if hasattr(self, "indices"):
return (
super().equals(other=other)
and (self._d == other._d)
and (self.learn_bounds == other.learn_bounds)
and (self.indices == other.indices).all()
)
else:
return (
super().equals(other=other)
and (self._d == other._d)
and (self.learn_bounds == other.learn_bounds)
)
return False