29389772364178f76ccf565917870639cad283bb,einops.py,,get_axes_names,#Any#,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: 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: pantsbuild/pants
Commit Name: 791be481c4a0102042dc0a502b08ba5cc6a85987
Time: 2020-06-29
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/inject_init_test.py
Class Name: InjectInitTest
Method Name: assert_injected
Project Name: CellProfiler/CellProfiler
Commit Name: 56119995edcfddc7f7376f4e5dc406cb9409afc6
Time: 2016-02-16
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/tests/test_measurecorrelation.py
Class Name: TestMeasureCorrelation
Method Name: test_02_03_get_measurement_images