File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1010class TestImage (unittest .TestCase ):
1111
1212 def test_pixel (self ):
13- im = Image (np .arange (80 ).reshape ((10 , 8 ))) # 8x10 image
13+ im = Image (np .arange (80 ).reshape ((10 , 8 )), dtype = "int64" ) # 8x10 image
1414 pix = im .pixel (5 , 6 )
1515 self .assertIsInstance (pix , np .int64 )
1616 self .assertEqual (pix , im .A [6 , 5 ])
@@ -23,7 +23,7 @@ def test_pixel(self):
2323
2424 def test_getitem_grey (self ):
2525
26- im = Image (np .arange (80 ).reshape ((10 , 8 ))) # 8x10 image
26+ im = Image (np .arange (80 ).reshape ((10 , 8 )), dtype = "int64" ) # 8x10 image
2727
2828 sim = im [0 :4 , 0 :6 ]
2929 self .assertEqual (sim .size , (4 , 6 ))
@@ -65,7 +65,7 @@ def test_getitem_grey(self):
6565
6666 def test_getitem_color (self ):
6767
68- im = Image (np .arange (240 ).reshape ((10 , 8 , 3 ))) # 8x10 image
68+ im = Image (np .arange (240 ).reshape ((10 , 8 , 3 )), dtype = "int64" ) # 8x10 image
6969
7070 sim = im [0 :4 , 0 :6 ]
7171 self .assertEqual (sim .size , (4 , 6 ))
You can’t perform that action at this time.
0 commit comments