e89370c2cf1ef9c7f97246b7cfc1de2c73c8c565,einops/einops.py,TransformRecipe,reconstruct_from_shape,#TransformRecipe#,126

Before Change


        // at this point all axes_lengths are computed (either have values or variables, but not Nones)

        init_shapes = axes_lengths
        reduced_axes_lengths = [dim for i, dim in enumerate(axes_lengths) if i not in self.reduced_elementary_axes]
        final_shapes = []
        for output_axis, grouping in enumerate(self.output_composite_axes):
            if output_axis == self.ellipsis_positions[1]:
                final_shapes.extend(ellipsis_shape)

After Change


                final_shapes.append(_product(lengths))
        reduced_axes = self.reduced_elementary_axes
        axes_reordering = self.axes_permutation
        added_axes = {pos: axes_lengths[pos_in_elementary] for pos, pos_in_elementary in self.added_axes.items()}
        if optimize:
            assert len(self.added_axes) == 0
            return _optimize_transformation(init_shapes, reduced_axes, axes_reordering, final_shapes)
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: arogozhnikov/einops
Commit Name: e89370c2cf1ef9c7f97246b7cfc1de2c73c8c565
Time: 2020-05-23
Author: iamfullofspam@gmail.com
File Name: einops/einops.py
Class Name: TransformRecipe
Method Name: reconstruct_from_shape


Project Name: arogozhnikov/einops
Commit Name: 3244bdf76f1a7aafff39df990913946d565e790f
Time: 2020-05-22
Author: iamfullofspam@gmail.com
File Name: einops/einops.py
Class Name: TransformRecipe
Method Name: reconstruct_from_shape


Project Name: nilmtk/nilmtk
Commit Name: 7d5c595768fb372606290277996ec63c5489aa11
Time: 2014-12-19
Author: jack-list@xlk.org.uk
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: draw_wiring_graph


Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree