Ejemplo n.º 1
0
    def test_kernel_linear(self):
        """
        Tests :func:`colour.algebra.interpolation.kernel_linear` definition.
        """

        np.testing.assert_almost_equal(
            kernel_linear(np.linspace(-5, 5, 25)),
            np.array([
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000,
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000,
                0.16666667, 0.58333333, 1.00000000, 0.58333333, 0.16666667,
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000,
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000
            ]),
            decimal=7)
Ejemplo n.º 2
0
    def test_kernel_linear(self):
        """
        Tests :func:`colour.algebra.interpolation.kernel_linear` definition.
        """

        np.testing.assert_almost_equal(
            kernel_linear(np.linspace(-5, 5, 25)),
            np.array([
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000,
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000,
                0.16666667, 0.58333333, 1.00000000, 0.58333333, 0.16666667,
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000,
                0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000
            ]),
            decimal=7)