Ah, okay. What initially caught my eye was the duplicated np.array_equal(self.cd,other.cd) line. I guess I figured the duplication indicated something was missing instead of simply being superfluous. And now I see that yes, equal wcs_types implies equal projections, so long as one isn't directly manipulating attributes.
No need to complicate __eq__ and unit tests. I'll simplify this to a more cosmetic fix.
Ah, okay. What initially caught my eye was the duplicated
np.array_equal(self.cd,other.cd)
line. I guess I figured the duplication indicated something was missing instead of simply being superfluous. And now I see that yes, equalwcs_type
s implies equalprojection
s, so long as one isn't directly manipulating attributes.No need to complicate
__eq__
and unit tests. I'll simplify this to a more cosmetic fix.