"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "skimage/exposure/tests/test_exposure.py" between
scikit-image-0.19.2.tar.gz and scikit-image-0.19.3.tar.gz

About: scikit-image is a collection of algorithms for image processing in Python.

test_exposure.py  (scikit-image-0.19.2):test_exposure.py  (scikit-image-0.19.3)
skipping to change at line 52 skipping to change at line 52
assert frequencies[-1] == 1 assert frequencies[-1] == 1
assert_array_equal(frequencies[1:-1], 0) assert_array_equal(frequencies[1:-1], 0)
def test_int_range_image(): def test_int_range_image():
im = np.array([10, 100], dtype=np.int8) im = np.array([10, 100], dtype=np.int8)
frequencies, bin_centers = exposure.histogram(im) frequencies, bin_centers = exposure.histogram(im)
assert_equal(len(bin_centers), len(frequencies)) assert_equal(len(bin_centers), len(frequencies))
assert_equal(bin_centers[0], 10) assert_equal(bin_centers[0], 10)
assert_equal(bin_centers[-1], 100) assert_equal(bin_centers[-1], 100)
def test_multichannel_int_range_image():
im = np.array([[10, 5], [100, 102]], dtype=np.int8)
frequencies, bin_centers = exposure.histogram(im, channel_axis=-1)
for ch in range(im.shape[-1]):
assert_equal(len(frequencies[ch]), len(bin_centers))
assert_equal(bin_centers[0], 5)
assert_equal(bin_centers[-1], 102)
def test_peak_uint_range_dtype(): def test_peak_uint_range_dtype():
im = np.array([10, 100], dtype=np.uint8) im = np.array([10, 100], dtype=np.uint8)
frequencies, bin_centers = exposure.histogram(im, source_range='dtype') frequencies, bin_centers = exposure.histogram(im, source_range='dtype')
assert_array_equal(bin_centers, np.arange(0, 256)) assert_array_equal(bin_centers, np.arange(0, 256))
assert_equal(frequencies[10], 1) assert_equal(frequencies[10], 1)
assert_equal(frequencies[100], 1) assert_equal(frequencies[100], 1)
assert_equal(frequencies[101], 0) assert_equal(frequencies[101], 0)
assert_equal(frequencies.shape, (256,)) assert_equal(frequencies.shape, (256,))
def test_peak_int_range_dtype(): def test_peak_int_range_dtype():
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)