Skip to content

Commit

Permalink
TST: remove calls to deprecated numpy.alltrue function (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
mj-will authored Jan 10, 2025
1 parent 6fbb4bf commit 82bdf36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/gw/detector/calibration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_repr(self):
def test_calibration_factor(self):
frequency_array = np.linspace(20, 1024, 1000)
cal_factor = self.model.get_calibration_factor(frequency_array)
assert np.alltrue(cal_factor.real == np.ones_like(frequency_array))
assert np.all(cal_factor.real == np.ones_like(frequency_array))


class TestCubicSpline(unittest.TestCase):
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_calibration_factor(self):
cal_factor = self.model.get_calibration_factor(
frequency_array, **self.parameters
)
assert np.alltrue(cal_factor.real == np.ones_like(frequency_array))
assert np.all(cal_factor.real == np.ones_like(frequency_array))

def test_repr(self):
expected = "CubicSpline(prefix='{}', minimum_frequency={}, maximum_frequency={}, n_points={})".format(
Expand Down

0 comments on commit 82bdf36

Please sign in to comment.