def test_all(self): expected = np.array( [[0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1]], dtype=np.uint8) encoded = thermo_encode_8([0, 1, 2, 3, 4, 5, 6, 7, 8]) npt.assert_array_equal(encoded, expected)
def test0(self): expected = np.array([[0, 0, 0, 0, 0, 0, 0, 0]], dtype=np.uint8) encoded = thermo_encode_8([0]) npt.assert_array_equal(encoded, expected)
def test8(self): expected = np.array([[1, 1, 1, 1, 1, 1, 1, 1]], dtype=np.uint8) encoded = thermo_encode_8([8]) npt.assert_array_equal(encoded, expected)