4dcd8834a0976041246fda6573d8117f86396946,scipy/interpolate/tests/test_polyint.py,TestCubicSpline,_check_continuity,#TestCubicSpline#Any#Any#,477
Before Change
def _check_continuity(self, S, alpha=1e-8):
x = S.x
dx = -alpha * np.diff(x)
for i in range(3):
D = S.derivative()
t = S(x[1:]) + D(x[1:]) * dx
v = S(x[1:] + dx)
assert_allclose(t, v, rtol=alpha*1e3)
S = D
After Change
def _check_continuity(self, S, tol=1e-7):
c = S.c
dx = np.diff(S.x)[:-1]
assert_allclose(c[3, 1:], c[0, :-1] * dx**3 + c[1, :-1] * dx**2 +
c[2, :-1] * dx + c[3, :-1], rtol=tol, atol=tol)
assert_allclose(c[2, 1:], 3 * c[0, :-1] * dx**2 + 2 * c[1, :-1] * dx +
c[2, :-1], rtol=tol, atol=tol)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: scipy/scipy
Commit Name: 4dcd8834a0976041246fda6573d8117f86396946
Time: 2016-02-01
Author: nikolay.mayorov@zoho.com
File Name: scipy/interpolate/tests/test_polyint.py
Class Name: TestCubicSpline
Method Name: _check_continuity
Project Name: nipy/dipy
Commit Name: 0b2f543554238d6696862652c3d60dd94f68c7e6
Time: 2013-08-06
Author: garyfallidis@gmail.com
File Name: dipy/segment/mask.py
Class Name:
Method Name: hist_mask
Project Name: bashtage/linearmodels
Commit Name: 34e7e918bd4fc09f643e8bb448e875a9bcb7e841
Time: 2017-03-29
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/data.py
Class Name: PanelData
Method Name: first_difference
Project Name: nipy/dipy
Commit Name: bf8cfdcf196fcce9c6ba50c570257a2bde5c687f
Time: 2013-08-06
Author: garyfallidis@gmail.com
File Name: dipy/segment/mask.py
Class Name:
Method Name: hist_mask