f3c73058f769fde0679c377cdf5b3f6754628313,scipy/stats/tests/test_fit.py,,check_cont_fit,#Any#Any#,35

Before Change


    if np.any(np.isnan(est)):
        raise AssertionError("nan returned in fit")
    else:
        if np.any((np.abs(diff) - diffthreshold) > 0.0):
////            txt = "WARNING - diff too large with small sample"
////            print "parameter diff =", diff - diffthreshold, txt
            rvs = np.concatenate([rvs,distfn.rvs(size=n_repl2-n_repl1,*arg)])

After Change




def check_cont_fit(distname,arg):
    if distname in failing_fits:
        // Skip failing fits unless overridden
        xfail = True
        try: 
            xfail = not int(os.environ["SCIPY_XFAIL"])
        except: 
            pass
        if xfail:
            msg = "Fitting %s doesn"t work reliably yet" % distname
            msg += " [Set environment variable SCIPY_XFAIL=1 to run this test nevertheless.]"
            dec.knownfailureif(True, msg)(lambda: None)()

    distfn = getattr(stats, distname)

    truearg = np.hstack([arg,[0.0,1.0]])
    diffthreshold = np.max(np.vstack([truearg*thresh_percent,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: scipy/scipy
Commit Name: f3c73058f769fde0679c377cdf5b3f6754628313
Time: 2013-05-01
Author: pav@iki.fi
File Name: scipy/stats/tests/test_fit.py
Class Name:
Method Name: check_cont_fit


Project Name: sympy/sympy
Commit Name: 10cf79674eafdbfeaf08485425967f0cd1ccbb70
Time: 2020-07-04
Author: sachinagarwal0499@gmail.com
File Name: sympy/functions/special/error_functions.py
Class Name: erf
Method Name: _eval_rewrite_as_tractable


Project Name: chainer/chainerrl
Commit Name: 622dc5ba487a5b87fad7f0e988ddc664056601a8
Time: 2019-07-28
Author: prabhat.nagarajan@gmail.com
File Name: chainerrl/agents/iqn.py
Class Name: IQN
Method Name: _compute_loss