Exemplo n.º 1
0
    def test_linear_conversion(self):
        """
        Tests :func:`colour_hdri.utilities.common.linear_conversion`
        definition.
        """

        np.testing.assert_almost_equal(
            linear_conversion(np.linspace(0, 1, 10),
                              np.array([0, 1]),
                              np.array([1, np.pi])),
            np.array([1., 1.2379547, 1.4759095, 1.7138642, 1.951819,
                      2.1897737, 2.4277284, 2.6656832, 2.9036379, 3.1415927]),
            decimal=7)
Exemplo n.º 2
0
    def test_linear_conversion(self):
        """
        Tests :func:`colour_hdri.utilities.common.linear_conversion`
        definition.
        """

        np.testing.assert_almost_equal(
            linear_conversion(np.linspace(0, 1, 10),
                              np.array([0, 1]),
                              np.array([1, np.pi])),
            np.array([1.00000000, 1.23795474, 1.47590948, 1.71386422,
                      1.95181896, 2.18977370, 2.42772844, 2.66568318,
                      2.90363791, 3.14159265]),
            decimal=8)