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
    if image.ndim != 2:
        raise ValueError("Skeletonize requires a 2D array")
    if not np.all(np.in1d(image.flat, (0, 1))):
        raise ValueError("Image contains values other than 0 and 1")

    return _fast_skeletonize(image)

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


def skeletonize_2d(image):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

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: sony/nnabla
Commit Name: c683f4b1b06a2108249820888516b333313e0569
Time: 2019-08-07
Author: Yuchi.Wen@sony.com
File Name: python/src/nnabla/utils/converter/onnx/importer.py
Class Name: OnnxImporter
Method Name: Reshape


Project Name: sony/nnabla
Commit Name: c683f4b1b06a2108249820888516b333313e0569
Time: 2019-08-07
Author: Yuchi.Wen@sony.com
File Name: python/src/nnabla/utils/converter/onnx/importer.py
Class Name: OnnxImporter
Method Name: Tile