diff --git a/src/pyuvdata/parameter.py b/src/pyuvdata/parameter.py index a7a14a943..1d347c492 100644 --- a/src/pyuvdata/parameter.py +++ b/src/pyuvdata/parameter.py @@ -326,17 +326,6 @@ def __eq__(self, other, *, silent=False): if not ( isinstance(other, self.__class__) and isinstance(self, other.__class__) ): - # If the UVParameter value is of the same type, then compare that instead - if isinstance(other, self.value.__class__) and isinstance( - self.value, other.__class__ - ): - if not silent: - print( - f"{self.name} and other classes do not match, but " - f"{self.name}.value and other do -- comparing those instead." - ) - return self.compare_value(other) - if not silent: print(f"{self.name} parameter classes are different") return False diff --git a/tests/uvdata/test_uvdata.py b/tests/uvdata/test_uvdata.py index 434bc3fa5..9aeab96d3 100644 --- a/tests/uvdata/test_uvdata.py +++ b/tests/uvdata/test_uvdata.py @@ -1558,9 +1558,8 @@ def test_select_antennas(casa_uvfits, invert, use_names, higher_dim, keep_meta): uv_object.telescope.antenna_names = np.array(uv_object.telescope.antenna_names) orig_telescope.antenna_names = np.array(orig_telescope.antenna_names) for param in ["_antenna_names", "_antenna_positions"]: - assert ( - getattr(uv_object.telescope, param) - == (getattr(orig_telescope, param[1:])[mask]) + assert getattr(uv_object.telescope, param).compare_value( + getattr(orig_telescope, param[1:])[mask] ) assert np.asarray(uv_object.telescope)