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
def transpose(tensor, pattern, **axes_lengths):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: comic/grand-challenge.org
Commit Name: 0871213805b20a8063f7d857dd0a6bc6afb3c521
Time: 2019-07-30
Author: code@jmsmkn.com
File Name: app/tests/reader_studies_tests/test_forms.py
Class Name:
Method Name: test_question_create
Project Name: pgmpy/pgmpy
Commit Name: bf04af44063f12cdc98db9d5cab71edb210e76b1
Time: 2014-02-25
Author: ankurankan@gmail.com
File Name: pgmpy/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: get_independencies