e9eb6182d5d3297e79b432a66a2828eb720431ca,scipy/sparse/linalg/_onenormest.py,,sign_round_up,#Any#,109

Before Change



def sign_round_up(X):
    // differs from numpy sign in the way it handles entries that are zero
    return np.sign(np.sign(X) + 0.5)


def elementary_vector(n, i):

After Change



    
    Y = X.copy()
    Y[Y == 0] = 1
    Y /= np.abs(Y)
    return Y

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scipy/scipy
Commit Name: e9eb6182d5d3297e79b432a66a2828eb720431ca
Time: 2015-03-16
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_onenormest.py
Class Name:
Method Name: sign_round_up


Project Name: mapillary/inplace_abn
Commit Name: a6b09bcc318e4488e94c2a515cdaf762c52bda46
Time: 2019-02-11
Author: samuel@mapillary.com
File Name: modules/functions.py
Class Name: InPlaceABNSync
Method Name: backward


Project Name: mapillary/inplace_abn
Commit Name: a6b09bcc318e4488e94c2a515cdaf762c52bda46
Time: 2019-02-11
Author: samuel@mapillary.com
File Name: modules/functions.py
Class Name: InPlaceABN
Method Name: backward