def test_axis_1_with_nans(self, array): expected = np.array([1, 1, 1, 0], dtype=bool) result = any_nan(array(self.x_with_nans), axis=1) np.testing.assert_equal(result, expected)
def test_axis_none_with_nans(self, array): self.assertTrue(any_nan(array(self.x_with_nans)))
def test_axis_0_without_nans(self, array): expected = np.array([0, 0, 0, 0], dtype=bool) result = any_nan(array(self.x_no_nans), axis=0) np.testing.assert_equal(result, expected)
def test_axis_none_without_nans(self, array): self.assertFalse(any_nan(array(self.x_no_nans)))