def test_domain_range_scale_XYZ_to_sd(self):
    '\n        Tests :func:`colour.recovery.XYZ_to_sd` definition domain\n        and range scale support.\n        '
    XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
    m = ('Jakob 2019', 'Mallett 2019', 'Meng 2015', 'Otsu 2018', 'Smits 1999')
    v = [sd_to_XYZ_integration(XYZ_to_sd(XYZ, method, cmfs=self._cmfs, illuminant=self._sd_D65), self._cmfs, self._sd_D65) for method in m]
    d_r = (('reference', 1, 1), (1, 1, 0.01), (100, 100, 1))
    for (method, value) in zip(m, v):
        for (scale, factor_a, factor_b) in d_r:
            with domain_range_scale(scale):
                np.testing.assert_almost_equal(sd_to_XYZ_integration(XYZ_to_sd((XYZ * factor_a), method, cmfs=self._cmfs, illuminant=self._sd_D65), self._cmfs, self._sd_D65), (value * factor_b), decimal=7)
Tests :func:`colour.recovery.XYZ_to_sd` definition domain
and range scale support.
def test_domain_range_scale_XYZ_to_sd(self):
    '\n        Tests :func:`colour.recovery.XYZ_to_sd` definition domain\n        and range scale support.\n        '
    XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
    m = ('Jakob 2019', 'Mallett 2019', 'Meng 2015', 'Otsu 2018', 'Smits 1999')
    v = [sd_to_XYZ_integration(XYZ_to_sd(XYZ, method, cmfs=self._cmfs, illuminant=self._sd_D65), self._cmfs, self._sd_D65) for method in m]
    d_r = (('reference', 1, 1), (1, 1, 0.01), (100, 100, 1))
    for (method, value) in zip(m, v):
        for (scale, factor_a, factor_b) in d_r:
            with domain_range_scale(scale):
                np.testing.assert_almost_equal(sd_to_XYZ_integration(XYZ_to_sd((XYZ * factor_a), method, cmfs=self._cmfs, illuminant=self._sd_D65), self._cmfs, self._sd_D65), (value * factor_b), decimal=7)