Exemplo n.º 1
0
 def test_all_false(self):
   x = array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=bool)
   assert_equal(arg_true_runs(x), [])
Exemplo n.º 2
0
 def test_odd(self):
   x = array([0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1], dtype=bool)
   assert_equal(arg_true_runs(x), [[3, 7], [9, 11]])
Exemplo n.º 3
0
 def test_all_true(self):
   x = array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], dtype=bool)
   assert_equal(arg_true_runs(x), [[0, 11]])
Exemplo n.º 4
0
 def test_none(self):
   x = array([], dtype=bool)
   assert_equal(arg_true_runs(x), [])
Exemplo n.º 5
0
 def test_even(self):
   x = array([1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0], dtype=bool)
   assert_equal(arg_true_runs(x), [[0, 3], [7, 9]])
Exemplo n.º 6
0
 def test_all_false(self):
   x = array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=bool)
   assert_equal(arg_true_runs(x), [])
Exemplo n.º 7
0
 def test_all_true(self):
   x = array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], dtype=bool)
   assert_equal(arg_true_runs(x), [[0, 11]])
Exemplo n.º 8
0
 def test_odd(self):
   x = array([0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1], dtype=bool)
   assert_equal(arg_true_runs(x), [[3, 7], [9, 11]])
Exemplo n.º 9
0
 def test_even(self):
   x = array([1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0], dtype=bool)
   assert_equal(arg_true_runs(x), [[0, 3], [7, 9]])
Exemplo n.º 10
0
 def test_none(self):
   x = array([], dtype=bool)
   assert_equal(arg_true_runs(x), [])