24259a5810c20a98a7b980fa818129a746b2ac20,labelme/utils.py,,img_b64_to_array,#Any#,59

Before Change




def img_b64_to_array(img_b64):
    f = io.BytesIO()
    f.write(base64.b64decode(img_b64))
    img_arr = np.array(PIL.Image.open(f))
    return img_arr


def polygons_to_mask(img_shape, polygons):
    mask = np.zeros(img_shape[:2], dtype=np.uint8)

After Change


def img_b64_to_array(img_b64):
    warnings.warn("img_ba64_to_array is deprecated. "
                  "Please use img_b64_to_arr.")
    return img_b64_to_arr(img_b64)


def img_b64_to_arr(img_b64):
    f = io.BytesIO()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: wkentaro/labelme
Commit Name: 24259a5810c20a98a7b980fa818129a746b2ac20
Time: 2018-04-01
Author: www.kentaro.wada@gmail.com
File Name: labelme/utils.py
Class Name:
Method Name: img_b64_to_array


Project Name: aws/sagemaker-python-sdk
Commit Name: 99b7b480329bda3a291422b5065c0ce3f74c713b
Time: 2020-02-25
Author: 6631887+laurenyu@users.noreply.github.com
File Name: tests/data/mxnet_mnist/mnist_neo.py
Class Name:
Method Name: neo_preprocess


Project Name: nilearn/nilearn
Commit Name: fe2b71071f871294b869f0314f89e4ca02469ab7
Time: 2020-10-08
Author: jerome@dockes.org
File Name: nilearn/reporting/html_report.py
Class Name:
Method Name: _embed_img


Project Name: ray-project/ray
Commit Name: f3fdb5c5db42324e53af7909d15922a71cbf1112
Time: 2020-07-26
Author: rliaw@berkeley.edu
File Name: python/ray/tune/function_runner.py
Class Name: FunctionRunner
Method Name: save_to_object