Пример #1
0
def test_mean_tl_1d():
    tl = np.array([20, 30, 40, 50])
    surfaces = np.array([50, 40, 30, 20])
    tl_real = 24.1116827
    calculated = mean_tl(tl, surfaces)
    assert_almost_equal(calculated, tl_real)
Пример #2
0
def test_mean_tl_1d():
    tl = np.array([20, 30, 40, 50])
    surfaces = np.array([50, 40, 30, 20])
    tl_real = 24.1116827
    calculated = mean_tl(tl, surfaces)
    assert_almost_equal(calculated, tl_real)
Пример #3
0
def test_mean_tl_2d():
    tl = np.array([[20, 30, 40, 50], [20, 30, 40, 50]])
    surfaces = np.array([[50, 40, 30, 20], [1, 10, 11, 22]])
    tl_real = np.array([24.1116827, 33.1466548])
    calculated = mean_tl(tl, surfaces)
    assert_array_almost_equal(calculated, tl_real)
Пример #4
0
def test_mean_tl_2d():
    tl = np.array([[20, 30, 40, 50], [20, 30, 40, 50]])
    surfaces = np.array([[50, 40, 30, 20], [1, 10, 11, 22]])
    tl_real = np.array([24.1116827, 33.1466548])
    calculated = mean_tl(tl, surfaces)
    assert_array_almost_equal(calculated, tl_real)