da9516b689891a227f67420c38849ba2f40367e5,scipy/sparse/data.py,_minmax_mixin,_min_or_max_axis,#_minmax_mixin#Any#Any#,106

Before Change


        // can"t use indices > data length with reduceat`
        trunc = np.searchsorted(indptr, indptr[-1])
        min_or_max.reduceat(mat.data, indptr[:trunc], out=out[:trunc])
        nnz = np.diff(indptr)
        // compare to 0 in non-full rows
        mask = nnz < N
        out[mask] = min_or_max(out[mask], zero)
        // reduceat will have filled empty rows with another data entry
        out[nnz == 0] = zero

After Change


        mat = self.tocsc() if axis == 0 else self.tocsr()
        mat.sum_duplicates()

        major_index, value = mat._minor_reduce(min_or_max)
        min_or_max(value, 0, out=value)

        out = np.zeros(len(mat.indptr) - 1, dtype=self.dtype)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scipy/scipy
Commit Name: da9516b689891a227f67420c38849ba2f40367e5
Time: 2014-01-28
Author: joel.nothman@gmail.com
File Name: scipy/sparse/data.py
Class Name: _minmax_mixin
Method Name: _min_or_max_axis


Project Name: bashtage/linearmodels
Commit Name: 34e7e918bd4fc09f643e8bb448e875a9bcb7e841
Time: 2017-03-29
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/data.py
Class Name: PanelData
Method Name: first_difference


Project Name: brainiak/brainiak
Commit Name: 9844e657a565158d7e46b0900270b21fbcc38d82
Time: 2017-08-09
Author: lcnature@users.noreply.github.com
File Name: brainiak/reprsimil/brsa.py
Class Name: BRSA
Method Name: _prepare_DF