a1890b56835ef626b1a32edcaf28c1e2b10baa48,dit/algorithms/maxentropyfw.py,,isolate_zeros,#,67

Before Change


    nonzero = [i for i in range(n_elements) if i not in zeroset]
    variables = Bunch(nonzero=nonzero, zero=zero)

    return A, b, variables


def initial_point(dist, k, A=None, b=None, isolated=None, **kwargs):

After Change


    else:
        xopt = optvariables[1].value

    // Turn values close to zero to be exactly equal to zero.
    xopt = np.array(xopt)[:,0]
    xopt[np.abs(xopt) < tol] = 0
    xopt /= xopt.sum()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dit/dit
Commit Name: a1890b56835ef626b1a32edcaf28c1e2b10baa48
Time: 2015-03-19
Author: chebee7i@gmail.com
File Name: dit/algorithms/maxentropyfw.py
Class Name:
Method Name: isolate_zeros


Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox


Project Name: neurodsp-tools/neurodsp
Commit Name: d71b12a9c909ff475d00b2840a40818a51dfc870
Time: 2019-03-21
Author: tdonoghue@ucsd.edu
File Name: neurodsp/sim/utils.py
Class Name:
Method Name: normalize_variance