b39db6e2bf0c806554578b5c9895d9b7ef6bd48c,Orange/statistics/util.py,,_count_nans_per_row_sparse,#Any#Any#,13

Before Change


     Count the number of nans (undefined) values per row. 
    items_per_row = 1 if X.ndim == 1 else X.shape[1]
    counts = np.ones(X.shape[0]) * items_per_row
    nnz_per_row = np.bincount(X.indices, minlength=len(counts))
    counts -= nnz_per_row
    if weights is not None:
        counts *= weights
    return np.sum(counts)

After Change



def _count_nans_per_row_sparse(X, weights):
     Count the number of nans (undefined) values per row. 
    counts = np.fromiter((np.isnan(row.data).sum() for row in X), dtype=np.float)

    if weights is not None:
        counts *= weights
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: biolab/orange3
Commit Name: b39db6e2bf0c806554578b5c9895d9b7ef6bd48c
Time: 2017-09-09
Author: pavlin.g.p@gmail.com
File Name: Orange/statistics/util.py
Class Name:
Method Name: _count_nans_per_row_sparse


Project Name: biolab/orange3
Commit Name: ac892eddd865681c9746efeda9f1f094f26cc32f
Time: 2012-11-29
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/filter.py
Class Name: Filter_Random
Method Name: __call__


Project Name: prody/ProDy
Commit Name: 223584e2a0b97b006b6ac944253e2573963a7a88
Time: 2018-09-25
Author: jamesmkrieger@gmail.com
File Name: prody/proteins/starfile.py
Class Name:
Method Name: parseImagesFromSTAR