680f4831e6c8f3102be8d99056b746b48ce34051,einops.py,,reduce,#,243
Before Change
for composite_axis in composite_axes_left:
found = {axis for axis in composite_axis if known_lengths[axis] is not None}
not_found = {axis for axis in composite_axis if known_lengths[axis] is None}
if len(not_found) == 0:
// imitating that size of the first one was not computed
not_found_axis = composite_axis[0]
found.remove(not_found_axis)
not_found.add(not_found_axis)
assert len(not_found) == 1
assert len(not_found) + len(found) == len(composite_axis)
axis, = not_found
computed_id = position_lookup[axis]
After Change
lookup = dict(zip(list(known_lengths), range(len(known_lengths))))
assert len(not_found) <= 1
assert len(not_found) + len(found) == len(composite_axis)
input_axes_known_unknown.append(([lookup[axis] for axis in found], [lookup[axis] for axis in not_found]) )
result_axes_grouping = [[position_lookup_after_reduction[axis] for axis in composite_axis]
for composite_axis in composite_axes_rght]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: arogozhnikov/einops
Commit Name: 680f4831e6c8f3102be8d99056b746b48ce34051
Time: 2018-09-27
Author: iamfullofspam@gmail.com
File Name: einops.py
Class Name:
Method Name: reduce
Project Name: scikit-image/scikit-image
Commit Name: f8d9a6c144ef84bad2478a4ba4eedb1c559274e0
Time: 2020-11-11
Author: rfezzani@gmail.com
File Name: skimage/_shared/coord.py
Class Name:
Method Name: ensure_spacing
Project Name: nilmtk/nilmtk
Commit Name: c9e4ae7a83255e5de84118e5366ecf02e32f6a5e
Time: 2014-06-30
Author: jack-list@xlk.org.uk
File Name: nilmtk/dataset_converters/redd/convert_redd.py
Class Name:
Method Name: convert_redd