Beispiel #1
0
 def test_unfold_with_enum_mask_with_enum_first(self):
     xtypes = [(ENUM, 2), FLOAT]
     x = np.array([[1, 1.5], [0, 1.5], [1, 1.5]])
     expected = [[0, 1, 1.5], [1, 0, 1.5], [0, 1, 1.5]]
     self.assertListEqual(expected, unfold_with_enum_mask(xtypes, x).tolist())
Beispiel #2
0
 def test_unfold_with_enum_mask(self):
     xtypes = [FLOAT, (ENUM, 2)]
     x = np.array([[1.5, 1], [1.5, 0], [1.5, 1]])
     expected = [[1.5, 0, 1], [1.5, 1, 0], [1.5, 0, 1]]
     self.assertListEqual(expected, unfold_with_enum_mask(xtypes, x).tolist())