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

Before Change


        zero = self.dtype.type(0)
        out_mat = lil_matrix((1, len(mat.indptr) - 1), dtype=self.dtype)
        row = out_mat.rows[0]
        data = out_mat.data[0]

        for i, (start, stop) in enumerate(izip(mat.indptr, mat.indptr[1:])):
            if start == stop:
                continue

After Change


        zero = self.dtype.type(0)
        out = np.zeros(len(indptr) - 1, dtype=self.dtype)
        // 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)
        min_or_max(out, zero, where=nnz < N, out=out)
        out[nnz == 0] = zero
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scipy/scipy
Commit Name: 1af61eee76fc63e98ba5ad85ad82fbd18111b8e9
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: RaRe-Technologies/gensim
Commit Name: 1a393b86be8dda5ecce0b17dc1e23549018bfc2b
Time: 2015-06-29
Author: gojogit@gmail.com
File Name: gensim/models/word2vec.py
Class Name:
Method Name: train_sg_pair


Project Name: RaRe-Technologies/gensim
Commit Name: 1a393b86be8dda5ecce0b17dc1e23549018bfc2b
Time: 2015-06-29
Author: gojogit@gmail.com
File Name: gensim/models/word2vec.py
Class Name:
Method Name: train_cbow_pair