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

Before Change


            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


def transpose(tensor, pattern, **axes_lengths):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

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: kkroening/ffmpeg-python
Commit Name: 4f97d1d679c3d7aeab703925c665df2370f08980
Time: 2018-06-27
Author: karlk@kralnet.us
File Name: ffmpeg/_view.py
Class Name:
Method Name: view


Project Name: PetrochukM/PyTorch-NLP
Commit Name: 2a1a6851344172e0134f3c5f4f5c1021975f2812
Time: 2018-03-11
Author: petrochukm@gmail.com
File Name: torchnlp/samplers/bucket_batch_sampler.py
Class Name: BucketBatchSampler
Method Name: __iter__