e3cba47cac279d7d810b1bfe7b88d2f5eb8227b7,skimage/morphology/_skeletonize.py,,skeletonize,#Any#,17

Before Change


    

    // convert to unsigned int (this should work for boolean values)
    image = image.astype(np.uint8)

    // check some properties of the input image:
    //  - 2D
    //  - binary image with only 0"s and 1"s

After Change



    if image.ndim == 2 and (method is None or method == "zhang"):
        skeleton = skeletonize_2d(image)
    elif image.ndim == 3 and method == "zhang":
        raise ValueError("skeletonize method "zhang" only works for 2D "
                         "images.")
    elif image.ndim == 3 or (image.ndim == 2 and method == "lee"):
        skeleton = skeletonize_3d(image)
    else:
        raise ValueError("skeletonize requires a 2D or 3D image as input, "
                         "got {}D.".format(image.ndim))
    return skeleton
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 7

Instances


Project Name: scikit-image/scikit-image
Commit Name: e3cba47cac279d7d810b1bfe7b88d2f5eb8227b7
Time: 2019-05-14
Author: juan.nunez-iglesias@monash.edu
File Name: skimage/morphology/_skeletonize.py
Class Name:
Method Name: skeletonize


Project Name: lanpa/tensorboardX
Commit Name: 96b86b79b1dc051d013b8d18daee0d340fb3079d
Time: 2019-06-27
Author: huang.dexter@gmail.com
File Name: tensorboardX/summary.py
Class Name:
Method Name: image_boxes


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/implicit.py
Class Name: ImplicitSequenceModel
Method Name: fit


Project Name: EpistasisLab/tpot
Commit Name: e452c68c8cc46ed2577f8125fc2fd67ff6717d27
Time: 2016-08-20
Author: rso@randalolson.com
File Name: tpot/tpot.py
Class Name: TPOT
Method Name: fit


Project Name: aleju/imgaug
Commit Name: 8eb4cb520a5ccfca9c25e849ccf0e17b1cd0659d
Time: 2018-12-23
Author: alexander.jung@zenuity.com
File Name: imgaug/augmenters/geometric.py
Class Name: PerspectiveTransform
Method Name: _augment_images


Project Name: chainer/chainer
Commit Name: 49e9ee4e7374152f89d2fef3c255acb1cf23eba7
Time: 2019-10-23
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: tests/chainerx_tests/unit_tests/routines_tests/test_manipulation.py
Class Name: TestCopyTo
Method Name: generate_inputs