3071a5a24e23b4f3ff0184b3a09cda4102838460,skimage/measure/_moments.py,,moments_coords_central,#Any#Any#Any#,51

Before Change


        // adjust shape for proper broadcasting later on
        for _ in itertools.repeat(None, axis):
            isolated_axis = np.expand_dims(isolated_axis, axis=1)
        for _ in itertools.repeat(None, ndim - (axis + 1)):
            isolated_axis = np.expand_dims(isolated_axis, axis=-1)

        // calculate the moments for each point, one axis at a time
        calc = calc * isolated_axis

    // sum all individual point moments to get our final answer
    calc = calc.sum(axis=0)

After Change


        isolated_axis = coords[:, axis::ndim].squeeze(axis=1)

        // rotate orientation of matrix for proper broadcasting
        isolated_axis = np.moveaxis(isolated_axis, 1, 1 + axis)

        // calculate the moments for each point, one axis at a time
        calc = calc * isolated_axis
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: scikit-image/scikit-image
Commit Name: 3071a5a24e23b4f3ff0184b3a09cda4102838460
Time: 2017-12-06
Author: contact@kne42.me
File Name: skimage/measure/_moments.py
Class Name:
Method Name: moments_coords_central


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 66268ffdc847e64216114871bd4169ad7872966a
Time: 2019-04-11
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/pyNN_target_sim.py
Class Name: SNN
Method Name: simulate


Project Name: LCAV/pyroomacoustics
Commit Name: 400d559e4e388ecc59dfe21ce9abe83ee04da979
Time: 2020-05-31
Author: 32697085+Womac@users.noreply.github.com
File Name: pyroomacoustics/doa/music.py
Class Name: MUSIC
Method Name: _process