04e049d888db8382caed35bb5dcae12b977b0474,scipy/interpolate/tests/test_fitpack2.py,TestUnivariateSpline,test_out_of_range_regression,#TestUnivariateSpline#,81
Before Change
Regression test for /.
x_in_range = [-3., -2.33333333, -1.66666667, -1., -0.33333333,
0.33333333, 1., 1.66666667, 2.33333333, 3.]
x_out_of_range = [-3.66666667, -3., -2.33333333, -1.66666667, -1.,
-0.33333333, 0.33333333, 1., 1.66666667, 2.33333333,
3., 3.66666667]
y = [-0.03443365, 0.02969204, 0.16251805, 0.33279394, 1.07995049,
0.88203547, 0.31274008, -0.10215527, -0.0274716, -0.06661292]
desired = array([0., -0.21332128, 0.16590419, 0.41822373, 0.55728419,
0.59673238, 0.55021514, 0.43137928, 0.25387164,
After Change
def test_out_of_range_regression(self):
// Test different extrapolation modes. See ticket 3557
x = np.arange(5, dtype=np.float)
y = x ** 3
spl = UnivariateSpline(x=x, y=y)
xp = linspace(-8, 13, 100)
xp_zeros = xp.copy()
xp_zeros[np.logical_or(xp_zeros < 0., xp_zeros > 4.)] = 0
assert_allclose(spl(xp, ext=0), xp**3, atol=1e-16)
assert_allclose(spl(xp, ext=1), xp_zeros**3, atol=1e-16)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: scipy/scipy
Commit Name: 04e049d888db8382caed35bb5dcae12b977b0474
Time: 2014-07-07
Author: jacobcvt12@gmail.com
File Name: scipy/interpolate/tests/test_fitpack2.py
Class Name: TestUnivariateSpline
Method Name: test_out_of_range_regression
Project Name: scipy/scipy
Commit Name: 04e049d888db8382caed35bb5dcae12b977b0474
Time: 2014-07-07
Author: jacobcvt12@gmail.com
File Name: scipy/interpolate/tests/test_fitpack2.py
Class Name: TestUnivariateSpline
Method Name: test_out_of_range_regression
Project Name: Kaixhin/Rainbow
Commit Name: fbc23881c651d69da1f7ba92bdab78009d33bf94
Time: 2020-08-20
Author: 32273096+Aladoro@users.noreply.github.com
File Name: memory.py
Class Name: ReplayMemory
Method Name: __next__
Project Name: tensorflow/models
Commit Name: 6cd426d917d10f3f334cb009d12db527ef81750f
Time: 2019-10-17
Author: jingli@google.com
File Name: official/nlp/xlnet/data_utils.py
Class Name:
Method Name: _local_perm