diff --git a/pyuvdata/utils.py b/pyuvdata/utils.py index 89058042c5..944af495a2 100644 --- a/pyuvdata/utils.py +++ b/pyuvdata/utils.py @@ -6044,11 +6044,7 @@ def determine_rectangularity( baseline_array = baseline_array.reshape((nbls, ntimes)) if np.sum(np.abs(np.diff(time_array, axis=0))) != 0: return False, False - if np.any( - np.logical_not( - np.apply_along_axis(lambda x: np.allclose(x, x[0]), 1, baseline_array) - ) - ): + if (np.diff(baseline_array, axis=1) != 0).any(): return False, False return True, True elif bl_first: @@ -6056,10 +6052,6 @@ def determine_rectangularity( baseline_array = baseline_array.reshape((ntimes, nbls)) if np.sum(np.abs(np.diff(time_array, axis=1))) != 0: return False, False - if np.any( - np.logical_not( - np.apply_along_axis(lambda x: np.allclose(x, x[0]), 0, baseline_array) - ) - ): + if (np.diff(baseline_array, axis=0) != 0).any(): return False, False return True, False