f30789aaf1f49e25059bc39d45656435d99c0677,skimage/measure/tests/test_profile.py,,test_reduce_func_sqrt_linewidth_3,#,166

Before Change


def test_reduce_func_sqrt_linewidth_3():
    prof = profile_line(pyth_image, (1, 2), (4, 2),
                        linewidth=3, order=0, reduce_func=lambda x: x**0.5)
    expected_prof = np.array([[1.34164079, 0.77459667, 0.77459667],
                              [0.77459667, 1.34164079, 1.34164079],
                              [0., 0.77459667, 1.34164079],
                              [0., 0., 0.77459667]])
    assert_almost_equal(prof, expected_prof)


def test_reduce_func_sumofsqrt_linewidth_3():

After Change


    prof = profile_line(pyth_image, (1, 2), (4, 2), linewidth=3,
                        order=0, reduce_func=reduce_func,
                        mode="constant")
    expected_prof = np.apply_along_axis(reduce_func,
                                        arr=pyth_image[1:5, 1:4], axis=1)
    assert_almost_equal(prof, expected_prof)


def test_reduce_func_sumofsqrt_linewidth_3():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: scikit-image/scikit-image
Commit Name: f30789aaf1f49e25059bc39d45656435d99c0677
Time: 2020-04-07
Author: rfezzani@gmail.com
File Name: skimage/measure/tests/test_profile.py
Class Name:
Method Name: test_reduce_func_sqrt_linewidth_3


Project Name: scikit-image/scikit-image
Commit Name: f30789aaf1f49e25059bc39d45656435d99c0677
Time: 2020-04-07
Author: rfezzani@gmail.com
File Name: skimage/measure/tests/test_profile.py
Class Name:
Method Name: test_reduce_func_sumofsqrt_linewidth_3


Project Name: scikit-image/scikit-image
Commit Name: f30789aaf1f49e25059bc39d45656435d99c0677
Time: 2020-04-07
Author: rfezzani@gmail.com
File Name: skimage/measure/tests/test_profile.py
Class Name:
Method Name: test_reduce_func_lambda_linewidth_3