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

        out = lil_matrix(out, dtype=self.dtype)

After Change


        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)
        out[major_index] = value
        out = np.asmatrix(out)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: scipy/scipy
Commit Name: a7ff52f2e7c84b8e5c3f110dbee792f1962f526b
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: 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: scipy/scipy
Commit Name: 9166250ff63834bfd686e1ac5396639f046b340e
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