mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-26 13:37:17 +08:00
TST: smaller arrays for bit comparison in test_rank for speed
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user