0131d72f0f7a5c13f00961aea054094b2b78f071,scipy/interpolate/tests/test_bsplines.py,TestInterop,test_splev,#TestInterop#,550

Before Change


                        b(xnew), atol=1e-15, rtol=1e-15)

        // scalar `x` is handled
        ynew = [splev(x, b) for x in xnew]
        assert_allclose(ynew, b(xnew), atol=1e-15, rtol=1e-15)

        // with n-D coefficients, there"s a quirck.
        // If everything is done with splrep/splprep and splev, there are no

After Change



        // With n-D coefficients, there"s a quirck:
        // splev(x, BSpline) is equivalent to BSpline(x)
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", DeprecationWarning)
            assert_allclose(splev(xnew, b2),
                            b2(xnew), atol=1e-15, rtol=1e-15)

        // However, splev(x, BSpline.tck) needs some transposes. This is because
        // BSpline interpolates along the first axis, while the legacy FITPACK
        // wrapper does list(map(...)) which effectively interpolates along the
        // last axis. Like so:
        sh = tuple(range(1, b2.c.ndim)) + (0,)   // sh = (1, 2, 0)
        cc = b2.c.transpose(sh)
        tck = (b2.t, cc, b2.k)
        assert_allclose(splev(xnew, tck),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scipy/scipy
Commit Name: 0131d72f0f7a5c13f00961aea054094b2b78f071
Time: 2016-10-12
Author: evgeny.burovskiy@gmail.com
File Name: scipy/interpolate/tests/test_bsplines.py
Class Name: TestInterop
Method Name: test_splev


Project Name: theislab/scanpy
Commit Name: 7da447b4b42c4b214fc464deb3a3166a9bace7b2
Time: 2017-05-22
Author: f.alex.wolf@gmx.de
File Name: scanpy/preprocessing/simple.py
Class Name:
Method Name: filter_genes_dispersion


Project Name: pandas-dev/pandas
Commit Name: 0435d914d8cf8be2147af722e39310487f03ce8c
Time: 2020-10-10
Author: 41443370+ivanovmg@users.noreply.github.com
File Name: pandas/tests/plotting/test_frame.py
Class Name: TestDataFramePlots
Method Name: test_mpl2_color_cycle_str