29389772364178f76ccf565917870639cad283bb,einops.py,,get_axes_names,#,124

Before Change


        if "a" <= letter <= "z" or letter == "_":
            elementary_axes.append(letter)
        else:
            assert "0" <= letter <= "9"
            prev_letter = composite_axis_name.pop()
            assert "a" <= prev_letter <= "z"
            elementary_axes.append(prev_letter + letter)
    return elementary_axes[::-1]

After Change


def get_axes_names(composite_axis_name: str):
    axes_names = [axis for axis in composite_axis_name.split(" ") if len(axis) > 0]
    for axis in axes_names:
        if axis == "_":
            continue
        assert "a" <= axis[0] <= "z"
        for letter in axis:
            assert str.isdigit(letter) or "a" <= letter <= "z"
    return axes_names
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: arogozhnikov/einops
Commit Name: 29389772364178f76ccf565917870639cad283bb
Time: 2018-09-27
Author: iamfullofspam@gmail.com
File Name: einops.py
Class Name:
Method Name: get_axes_names


Project Name: geomstats/geomstats
Commit Name: 2d00b7371a87b0a6a17de19d550e326db5cf15f3
Time: 2020-11-29
Author: nicolas.guigui@inria.fr
File Name: tests/test_backends.py
Class Name: TestBackends
Method Name: test_choice


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: 5bed3f48f0e37d9731b28a6d2505215419d670c8
Time: 2017-08-24
Author: jyang375@vicki.cc.gatech.edu
File Name: lib/model/rpn/proposal_target_layer.py
Class Name: _ProposalTargetLayer
Method Name: _get_bbox_regression_labels_pytorch


Project Name: oddt/oddt
Commit Name: 4d178824a9c005afd2ccc203bcc984945b8729f4
Time: 2018-05-17
Author: maciek@wojcikowski.pl
File Name: rdkit_fixer.py
Class Name:
Method Name: PreparePDBMol