def test_simple_find(self): x = np.array([-1., 1., -1., -2., -1., 1., 0.]) calculated = evstats.argupcross(x, x_up=0.) expected = np.array([0., 4]) np.testing.assert_array_equal(calculated, expected)
def test_simple_find_none(self): x = np.array([0.1, 1., 2., 3., 4., 5.]) calculated = evstats.argupcross(x, x_up=0.) expected = np.array([0.]) np.testing.assert_array_equal(calculated, expected)
def test_simple_find_w_other(self): x = np.array([0., 1., 0., -1., -2., -1., 0., 1., 0.]) + 2. calculated = evstats.argupcross(x, x_up=2.) expected = np.array([0., 6.]) np.testing.assert_array_equal(calculated, expected)