예제 #1
0
 def test_numeric_sequence_example_nonzero_base(self):
     from multicov.alphabet import NumericAlphabet
     alpha = NumericAlphabet(3, 8)
     self.assertTrue(np.array_equal(alpha.to_int([3, 7, 5]), [0, 4, 2]))
예제 #2
0
 def test_numeric_sequence_example_base0(self):
     from multicov.alphabet import NumericAlphabet
     alpha = NumericAlphabet(7)
     result = alpha.to_int([0, 2, 3])
     self.assertTrue(np.array_equal(result, [0, 2, 3]))