ba72837e5824eb67b8d345dd5555853221f4512a,grakel/tools.py,,matrix_to_dict,#Any#Any#Any#Any#Any#,147
Before Change
allow_diagonal: allows matrix diagonal to be added
at input
ops = {
">": operator.gt,
"<": operator.lt,
">=": operator.ge,
"<=": operator.le,
"==": operator.eq
}
opr = ops[op]
if(s==-1):
s = matrix.shape[0]
dictionary = dict()
After Change
for i in range(0,s):
line = matrix[i,:]
if not allow_diagonal:
np.delete(line,i)
w = np.where(opr(line,const_value))
dictionary[i] = list(w[0])
return dictionary
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 2
Instances Project Name: ysig/GraKeL
Commit Name: ba72837e5824eb67b8d345dd5555853221f4512a
Time: 2017-11-24
Author: y.siglidis@gmail.com
File Name: grakel/tools.py
Class Name:
Method Name: matrix_to_dict
Project Name: pfnet/optuna
Commit Name: ea5a09e2aa7da90fef7aaf21832d4f3f434936c1
Time: 2020-11-25
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: optuna/storages/_rdb/alembic/versions/v2.4.0.a.py
Class Name:
Method Name: upgrade
Project Name: ray-project/ray
Commit Name: 59e231818d8c0dc48a1b16e2a44984eb95a9ce6c
Time: 2021-03-24
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/tests/test_api_new.py
Class Name:
Method Name: test_delete_backend
Project Name: EpistasisLab/tpot
Commit Name: 2ab8c1444facbd46df8767a5badda5b9f1a50c29
Time: 2016-08-01
Author: supacoofoo@gmail.com
File Name: tpot/tpot.py
Class Name:
Method Name: main