f5122cdab53605b7b800c96d6700b791b8c9add8,librosa/segment.py,,lag_to_recurrence,#Any#Any#,287
Before Change
idx_slice = [slice(None)] * lag.ndim
for i in range(1, t):
idx_slice[axis] = i
lag[idx_slice] = np.roll(lag[idx_slice], i)
sub_slice = [slice(None)] * lag.ndim
sub_slice[1 - axis] = slice(t)
After Change
sparse = scipy.sparse.issparse(lag)
if sparse:
rec = scipy.sparse.lil_matrix(lag)
roll_ax = 1 - axis
else:
rec = lag.copy()
roll_ax = None
idx_slice = [slice(None)] * lag.ndim
for i in range(1, t):
idx_slice[axis] = i
rec[tuple(idx_slice)] = util.roll_sparse(lag[tuple(idx_slice)], i, axis=roll_ax)
sub_slice = [slice(None)] * rec.ndim
sub_slice[1 - axis] = slice(t)
rec = rec[tuple(sub_slice)]
if sparse:
return rec.asformat(lag.format)
else:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: librosa/librosa
Commit Name: f5122cdab53605b7b800c96d6700b791b8c9add8
Time: 2016-04-26
Author: brian.mcfee@nyu.edu
File Name: librosa/segment.py
Class Name:
Method Name: lag_to_recurrence
Project Name: epfl-lts2/pygsp
Commit Name: 41c414d219fbe7fb4df3a9539ca93ecf3425c266
Time: 2017-08-29
Author: michael.defferrard@epfl.ch
File Name: pygsp/graphs/minnesota.py
Class Name: Minnesota
Method Name: __init__
Project Name: ysig/GraKeL
Commit Name: c0bf6aca3816ed5d22234e909537ac2fe0dceef4
Time: 2020-07-18
Author: giannisnik@hotmail.com
File Name: grakel/kernels/weisfeiler_lehman_optimal_assignment.py
Class Name: WeisfeilerLehmanOptimalAssignment
Method Name: parse_input
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