61f037c3ab9dd7df522134b3048cebcf3f62e43f,skimage/draw/_random_shapes.py,,_generate_rectangle_mask,#,9

Before Change


        A mask of indices that the shape fills.
    
    available_width = min(image[1] - point[1], shape[1])
    if available_width < shape[0]:
        raise ArithmeticError("cannot fit shape to image")
    available_height = min(image[0] - point[0], shape[1])
    if available_height < shape[0]:
        raise ArithmeticError("cannot fit shape to image")
    // Pick random widths and heights.

After Change



    // Pick random widths and heights.
    r = shape[0] + random.randint(max(1, available_height)) - 1
    c = shape[0] + random.randint(max(1, available_width)) - 1
    rectangle = draw_polygon([
        point[0],
        point[0] + r,
        point[0] + r,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scikit-image/scikit-image
Commit Name: 61f037c3ab9dd7df522134b3048cebcf3f62e43f
Time: 2020-10-28
Author: rfezzani@gmail.com
File Name: skimage/draw/_random_shapes.py
Class Name:
Method Name: _generate_rectangle_mask


Project Name: scikit-image/scikit-image
Commit Name: 61f037c3ab9dd7df522134b3048cebcf3f62e43f
Time: 2020-10-28
Author: rfezzani@gmail.com
File Name: skimage/draw/_random_shapes.py
Class Name:
Method Name: _generate_triangle_mask


Project Name: Scitator/catalyst
Commit Name: e839626c28d8dc6030ce71f3619e934b36fb6627
Time: 2020-10-23
Author: Balaganskij.NN@phystech.edu
File Name: catalyst/metrics/functional.py
Class Name:
Method Name: process_multiclass_components