Ejemplo n.º 1
0
def test_shapes(params, shape_desired):
    """Test that the shape of the output is the expected one."""
    transformer = MultivariateTransformer(**params)
    assert transformer.fit(X).transform(X).shape == shape_desired
    assert transformer.fit_transform(X).shape == shape_desired
Ejemplo n.º 2
0
def test_ndim(params, ndim_desired):
    """Test that the ndim of the output is the expected one."""
    transformer = MultivariateTransformer(**params)
    assert transformer.fit(X).transform(X).ndim == ndim_desired
    assert transformer.fit_transform(X).ndim == ndim_desired