Пример #1
0
 def test_find_decluster_below_upcross(self):
     x = np.array([
         0., 1., 2., 1., 2., 3., 2., 1., 0., -1., -2., -1, -2, -1, 0., 1,
         0., -1., -2., -1., 0., 1.
     ])
     calculated = evstats.argrelmax_decluster(x, x_up=0.)
     expected = np.array([5, 15.])
     np.testing.assert_array_equal(calculated, expected)
Пример #2
0
 def test_find_decluster_below_upcross(self):
     x = np.array([0., 1., 2., 1., 2., 3., 2., 1., 0., -1., -2., -1, -2, -1,
                   0., 1, 0., -1., -2., -1., 0., 1.])
     calculated = evstats.argrelmax_decluster(x, x_up=0.)
     expected = np.array([5, 15.])
     np.testing.assert_array_equal(calculated, expected)
Пример #3
0
 def test_simple_find_none(self):
     x = np.array([0.1, 1., 2., 3., 4., 5.])
     calculated = evstats.argrelmax_decluster(x)
     expected = np.array([5])
     np.testing.assert_array_equal(calculated, expected)
Пример #4
0
 def test_simple_find_decluster(self):
     x = np.array([0., 1., 2., 1., 2., 3., 2., 1., 0., 2., -1., 1.])
     calculated = evstats.argrelmax_decluster(x, x_up=0.)
     expected = np.array([5, 9])
     np.testing.assert_array_equal(calculated, expected)
Пример #5
0
 def test_simple_find_none(self):
     x = np.array([0.1, 1., 2., 3., 4., 5.])
     calculated = evstats.argrelmax_decluster(x)
     expected = np.array([5])
     np.testing.assert_array_equal(calculated, expected)
Пример #6
0
 def test_simple_find_decluster(self):
     x = np.array([0., 1., 2., 1., 2., 3., 2., 1., 0., 2., -1., 1.])
     calculated = evstats.argrelmax_decluster(x, x_up=0.)
     expected = np.array([5, 9])
     np.testing.assert_array_equal(calculated, expected)