29389772364178f76ccf565917870639cad283bb,einops.py,,get_axes_names,#Any#,124
Before Change
composite_axis_name = list(composite_axis_name)
while len(composite_axis_name) > 0:
letter = composite_axis_name.pop()
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]
def transpose(tensor, pattern, **axes_lengths):
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):
In pattern: SUPERPATTERN
Frequency: 4
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: facebookresearch/ParlAI
Commit Name: 2cbc5eb42ee7c742a5ea0eca3f2de945a513c00a
Time: 2019-07-31
Author: 5313281+dexterju@users.noreply.github.com
File Name: parlai/core/metrics.py
Class Name: Metrics
Method Name: __init__
Project Name: mozilla/bugbug
Commit Name: 62a83fb59874e8840a8c26daaf51b9f949b42cd8
Time: 2019-01-28
Author: ayush.shridhar1999@gmail.com
File Name: bugbug/bug_features.py
Class Name: whiteboard
Method Name: __call__
Project Name: interactiveaudiolab/nussl
Commit Name: 734e0fc83fc1abdfd3f02dea791efb89dcaf90f8
Time: 2020-03-01
Author: prem@u.northwestern.edu
File Name: nussl/datasets/transforms.py
Class Name: SumSources
Method Name: __call__