@@ -18,30 +18,34 @@ def test_image_multi_discrete(self):
18
18
ds4 = [ds4 .n ]
19
19
print (ds4 )
20
20
imd = ImageMultiDiscrete (ds4 , transforms = "shift" )
21
+ print ("imd.dtype, shape" , imd .dtype , imd .shape )
22
+ print ("imd" , imd )
21
23
from PIL import Image
22
24
23
25
# img1 = Image.fromarray(imd.disjoint_states[0][1], 'L')
24
26
img1 = Image .fromarray (np .squeeze (imd .get_concatenated_image (3 )), "L" )
25
27
if render :
26
28
img1 .show ()
27
29
28
- imd = ImageMultiDiscrete (
29
- ds4 ,
30
- transforms = "scale,shift,rotate,flip" ,
31
- use_custom_images = "textures" ,
32
- cust_path = "/home/rajanr/textures" ,
33
- )
34
- img1 = Image .fromarray (np .squeeze (imd .get_concatenated_image (2 )), "RGB" )
30
+ if render :
31
+ imd = ImageMultiDiscrete (
32
+ ds4 ,
33
+ transforms = "scale,shift,rotate,flip" ,
34
+ use_custom_images = "textures" ,
35
+ cust_path = "/home/rajanr/textures" ,
36
+ )
37
+ img1 = Image .fromarray (np .squeeze (imd .get_concatenated_image (2 )), "RGB" )
35
38
if render :
36
39
img1 .show ()
37
40
38
- imd = ImageMultiDiscrete (
39
- ds4 ,
40
- transforms = "scale,shift,rotate,flip" ,
41
- use_custom_images = "images" ,
42
- cust_path = "/home/rajanr/textures" ,
43
- )
44
- img1 = Image .fromarray (np .squeeze (imd .get_concatenated_image (1 )), "RGB" )
41
+ if render :
42
+ imd = ImageMultiDiscrete (
43
+ ds4 ,
44
+ transforms = "scale,shift,rotate,flip" ,
45
+ use_custom_images = "images" ,
46
+ cust_path = "/home/rajanr/textures" ,
47
+ )
48
+ img1 = Image .fromarray (np .squeeze (imd .get_concatenated_image (1 )), "RGB" )
45
49
if render :
46
50
img1 .show ()
47
51
0 commit comments