824a16d535383cfc1a8dd653fdf1b749535a7456,scipy/sparse/linalg/_expm_action.py,,_trace,#Any#,163
Before Change
def _trace(A):
//XXX change this when the trace of a sparse matrix is available
if scipy.sparse.isspmatrix(A):
A = np.array(A.todense())
return np.trace(A)
// This table helps to compute bounds.
After Change
def _trace(A):
if scipy.sparse.isspmatrix(A):
return A.diagonal().sum()
else:
return np.trace(A)
def _ident_like(A):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: scipy/scipy
Commit Name: 824a16d535383cfc1a8dd653fdf1b749535a7456
Time: 2013-05-06
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_expm_action.py
Class Name:
Method Name: _trace
Project Name: scipy/scipy
Commit Name: 824a16d535383cfc1a8dd653fdf1b749535a7456
Time: 2013-05-06
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_expm_action.py
Class Name:
Method Name: _exact_1_norm
Project Name: scipy/scipy
Commit Name: 824a16d535383cfc1a8dd653fdf1b749535a7456
Time: 2013-05-06
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_expm_action.py
Class Name:
Method Name: _exact_inf_norm