680f4831e6c8f3102be8d99056b746b48ce34051,einops.py,,reduce,#Any#Any#Any#,243

Before Change


    for composite_axis in composite_axes_left:
        found = {axis for axis in composite_axis if known_lengths[axis] is not None}
        not_found = {axis for axis in composite_axis if known_lengths[axis] is None}
        if len(not_found) == 0:
            // imitating that size of the first one was not computed
            not_found_axis = composite_axis[0]
            found.remove(not_found_axis)
            not_found.add(not_found_axis)

        assert len(not_found) == 1
        assert len(not_found) + len(found) == len(composite_axis)
        axis, = not_found
        computed_id = position_lookup[axis]

After Change



    // TODO add dots
    if operation == "none":
        difference = set.symmetric_difference(identifiers_left, identifiers_rght)
        if len(difference) > 0:
            raise RuntimeError("Identifiers were only one side of expression: {}".format(difference))
    else:
        difference = set.difference(identifiers_rght, identifiers_left)
        if len(difference) > 0:
            raise RuntimeError("Unexpected identifiers appeared on the right side of expression: {}".format(difference))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: arogozhnikov/einops
Commit Name: 680f4831e6c8f3102be8d99056b746b48ce34051
Time: 2018-09-27
Author: iamfullofspam@gmail.com
File Name: einops.py
Class Name:
Method Name: reduce


Project Name: mil-tokyo/webdnn
Commit Name: 2571186c26968de784585bdabf0c0979e9608a85
Time: 2017-04-20
Author: y.kikura@gmail.com
File Name: src/graph_builder/optimizer/util.py
Class Name:
Method Name: listup_operator_in_order


Project Name: scikit-image/scikit-image
Commit Name: ea40a555956467d98c7d321633a73cf408d9a805
Time: 2016-11-08
Author: yue@berkeley.edu
File Name: skimage/color/colorlabel.py
Class Name:
Method Name: _match_label_with_color