82b08e11bc15d657466f45006baed7fd5810c470,scipy/optimize/_linprog_highs.py,,_replace_inf,#Any#,36

Before Change


    // I can get rid of the loop.
    replace_with = {np.inf: HIGHS_CONST_INF, -np.inf: -HIGHS_CONST_INF}
    for key, val in replace_with.items():
        x[x == key] = val
    return x

def _linprog_highs(lp, solver, time_limit=1, presolve=False, parallel=False,
                   disp = False, maxiter=None, autoscale=False,

After Change



def _replace_inf(x):
    // Replace `np.inf` with CONST_INF
    infs = (np.abs(x) == np.inf)
    x[infs] = np.sign(x[infs])*CONST_INF 
    return x

def _linprog_highs(lp, solver, time_limit=1, presolve=False, parallel=False,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scipy/scipy
Commit Name: 82b08e11bc15d657466f45006baed7fd5810c470
Time: 2020-04-02
Author: mhaberla@calpoly.edu
File Name: scipy/optimize/_linprog_highs.py
Class Name:
Method Name: _replace_inf


Project Name: geomstats/geomstats
Commit Name: 0a9959a054c76361d796280421041a8b7d37239d
Time: 2018-12-26
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: StiefelCanonicalMetric
Method Name: retraction


Project Name: arraiy/torchgeometry
Commit Name: 79327aeb7084c0127dda768d22709401d1b1c367
Time: 2019-05-28
Author: jiangwei1993@gmail.com
File Name: kornia/geometry/conversions.py
Class Name:
Method Name: convert_points_from_homogeneous