fba0fc9d72e984e73c8ed0de1e57bc37bbe8f676,Orange/statistics/util.py,,_count_nans_per_row_sparse,#Any#Any#Any#,14
Before Change
return np.fromiter((np.sum(row.data) for row in w), dtype=dtype)
return np.fromiter((np.isnan(row.data).sum() for row in X) , dtype=dtype)
def sparse_count_implicit_zeros(x):
After Change
w = w.tocsr()
return np.asarray(w.sum(axis=1), dtype=dtype).ravel()
if isinstance(X, (sp.csr_matrix, sp.csc_matrix)):
X = type(X)((np.isnan(X.data), X.indices, X.indptr), X.shape)
return np.asarray(X.sum(axis=1), dtype=dtype).ravel()
else: // pragma: no cover
raise TypeError("unsupported type "{}"".format(type(X).__name__))
def sparse_count_implicit_zeros(x):
Count the number of implicit zeros in a sparse matrix.
if not sp.issparse(x):
raise TypeError("The matrix provided was not sparse.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: biolab/orange3
Commit Name: fba0fc9d72e984e73c8ed0de1e57bc37bbe8f676
Time: 2018-03-23
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/statistics/util.py
Class Name:
Method Name: _count_nans_per_row_sparse
Project Name: theislab/scanpy
Commit Name: c241a91f4e99a8a8e158ef89fe609d6932688911
Time: 2019-06-03
Author: flying-sheep@web.de
File Name: scanpy/_settings.py
Class Name:
Method Name: _type_check
Project Name: pantsbuild/pants
Commit Name: e8ccd90f029a17d1822c37ebe259d77243fe2e67
Time: 2019-03-05
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: src/python/pants/engine/selectors.py
Class Name: Get
Method Name: __new__