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


        if not allow_diagonal:
            np.delete(line,i)
        w = np.where(opr(line,const_value))
        dictionary[i] = list(w[0])
    return dictionary

def extract_matrix(mat, a, b):
     Subtract the matrix corresponding to two 
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: ContextLab/hypertools
Commit Name: 8a9344ead3be54cf1d427b30888e0e84ffe4d20a
Time: 2018-01-22
Author: andrew.heusser@gmail.com
File Name: hypertools/tools/text2mat.py
Class Name:
Method Name: text2mat


Project Name: SeldonIO/seldon-core
Commit Name: d78331c9f66c47abeb806f2e409cdb442b2c02be
Time: 2020-03-23
Author: r.j.skolasinski@gmail.com
File Name: python/seldon_core/metrics.py
Class Name:
Method Name: