def test_scaling(): """Test the scaling function""" shape = (400, 10) u = np.random.randn(*shape) mean = 100 * np.random.rand(shape[1]) + 1 Y = u + mean Y_, mean_ = mean_scaling(Y) assert_almost_equal(Y_.mean(0), 0, 5) assert_almost_equal(mean_, mean, 0) assert Y.std() > 1
def test_scaling(): """Test the scaling function""" shape = (400, 10) u = np.random.randn(*shape) mean = 100 * np.random.rand(shape[1]) + 1 Y = u + mean Y_, mean_ = mean_scaling(Y) assert_almost_equal(Y_.mean(0), 0, 5) assert_almost_equal(mean_, mean, 0) assert_true(Y.std() > 1)