Scale¶
-
menpo.transform.
Scale
(scale_factor, n_dims=None)[source]¶ Factory function for producing Scale transforms. Zero scale factors are not permitted.
A
UniformScale
will be produced if:- A float
scale_factor
and an_dims
kwarg are provided - A ndarray
scale_factor
with shape(n_dims,)
is provided with all elements being the same
A
NonUniformScale
will be provided if:- A ndarray
scale_factor
with shape(n_dims,)
is provided with at least two differing scale factors.
Parameters: - scale_factor (float or
(n_dims,)
ndarray) – Scale for each axis. - n_dims (int, optional) – The dimensionality of the output transform.
Returns: scale (
UniformScale
orNonUniformScale
) – The correct type of scaleRaises: ValueError
– If any of the scale factors is zero- A float