TST: smaller arrays for bit comparison in test_rank for speed

This commit is contained in:
Jonathan Helmus
2015-07-11 17:46:17 -05:00
parent 2353113e49
commit ba65c3562b
+2 -2
View File
@@ -282,7 +282,7 @@ def test_compare_8bit_unsigned_vs_signed():
# of dynamic) should be identical
# Create signed int8 image that and convert it to uint8
image = img_as_ubyte(data.camera())
image = img_as_ubyte(data.camera())[::2, ::2]
image[image > 127] = 0
image_s = image.astype(np.int8)
with expected_warnings(['sign loss', 'precision loss']):
@@ -306,7 +306,7 @@ def test_compare_8bit_vs_16bit():
# filters applied on 8-bit image ore 16-bit image (having only real 8-bit
# of dynamic) should be identical
image8 = util.img_as_ubyte(data.camera())
image8 = util.img_as_ubyte(data.camera())[::2, ::2]
image16 = image8.astype(np.uint16)
assert_equal(image8, image16)