Module Import alias identifier ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword Num Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Num Num Assign TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad CompareLt NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Slice NameLoad attr BinOpMult BinOpDiv Num SubscriptLoad NameLoad ExtSlice Slice NameLoad Index NameLoad SubscriptLoad NameLoad ExtSlice Slice NameLoad Slice Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad ExtSlice Ellipsis Index Num ExtSlice Slice Index NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad ExtSlice Ellipsis Index Num ExtSlice Slice Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpAdd BinOpAdd NameLoad BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A numpy np base Transform Alignment Invertible rbf R2LogR2RBF ThinPlateSplines N/A Alignment Transform Invertible N/A N/A 
    The thin plate splines (TPS) alignment between 2D `source` and `target`
    landmarks.

    ``kernel`` can be used to specify an alternative kernel function. If
    ``None`` is supplied, the :class:`R2LogR2RBF` kernel will be used.

    Parameters
    ----------
    source : ``(N, 2)`` `ndarray`
        The source points to apply the tps from
    target : ``(N, 2)`` `ndarray`
        The target points to apply the tps to
    kernel : :class:`menpo.transform.rbf.RadialBasisFunction`, optional
        The kernel to apply.
    min_singular_val : `float`, optional
        If the target has points that are nearly coincident, the coefficients
        matrix is rank deficient, and therefore not invertible. Therefore, we
        only take the inverse on the full-rank matrix and drop any singular
        values that are less than this value (close to zero).

    Raises
    ------
    ValueError
        TPS is only with on 2-dimensional data
     __init__ N/A N/A self source target kernel min_singular_val N/A None 0.0001 N/A N/A N/A N/A Alignment __init__ self source target N/A N/A N/A self n_dims 2 N/A N/A N/A ValueError TPS can only be used on 2D data. N/A N/A kernel None N/A N/A kernel N/A R2LogR2RBF N/A source points N/A N/A self min_singular_val min_singular_val N/A N/A self kernel kernel N/A N/A self k N/A N/A N/A self kernel apply N/A N/A self source points N/A N/A self p N/A N/A np concatenate N/A N/A N/A np ones N/A N/A self n_points 1 N/A N/A self source points axis 1 N/A o N/A N/A np zeros N/A 3 3 N/A top_l N/A N/A np concatenate N/A N/A self k N/A self p axis 1 N/A bot_l N/A N/A np concatenate N/A N/A N/A self p T o axis 1 N/A N/A self l N/A N/A np concatenate N/A top_l bot_l axis 0 N/A N/A N/A self v N/A self y N/A self coefficients N/A None None None N/A N/A N/A self _build_coefficients N/A _build_coefficients N/A N/A self N/A N/A N/A N/A self v N/A N/A N/A N/A N/A self target points T copy N/A N/A self y N/A N/A np hstack N/A N/A self v N/A N/A np zeros N/A 2 3 N/A N/A _u _s _v N/A N/A N/A np linalg svd N/A self l N/A keep N/A N/A N/A _s shape N/A 0 N/A sum N/A _s N/A self min_singular_val N/A inv_l N/A N/A N/A _u N/A N/A N/A keep dot N/A N/A 1.0 N/A _s N/A N/A keep N/A None N/A _v N/A N/A keep N/A N/A N/A self coefficients N/A N/A inv_l dot N/A N/A self y T N/A _sync_state_from_target N/A N/A self N/A N/A N/A N/A N/A self _build_coefficients N/A _apply N/A N/A self points N/A kwargs N/A N/A 
        Performs a TPS transform on the given points.

        Parameters
        ----------
        points : ``(N, D)`` `ndarray`
            The points to transform.

        Returns
        -------
        f : ``(N, D)`` `ndarray`
            The transformed points

        Raises
        ------
        ValueError
            TPS can only be applied to 2D data.
         N/A N/A N/A N/A points shape N/A 1 N/A self n_dims N/A N/A N/A ValueError TPS can only be applied to 2D data. N/A x N/A N/A points N/A N/A N/A 0 N/A N/A N/A None N/A y N/A N/A points N/A N/A N/A 1 N/A N/A N/A None N/A c_affine_c N/A N/A self coefficients N/A -3 N/A c_affine_x N/A N/A self coefficients N/A -2 N/A c_affine_y N/A N/A self coefficients N/A -1 N/A f_affine N/A N/A c_affine_c N/A c_affine_x x N/A c_affine_y y N/A kernel_dist N/A N/A N/A self kernel apply points N/A c_affine_free N/A N/A self coefficients N/A -3 N/A f_affine_free N/A N/A kernel_dist dot c_affine_free N/A N/A f_affine f_affine_free N/A has_true_inverse N/A N/A self N/A N/A N/A 
        :type: ``False``
         N/A False N/A property pseudoinverse N/A N/A self N/A N/A N/A 
        The pseudoinverse of the transform - that is, the transform that
        results from swapping `source` and `target`, or more formally, negating
        the transforms parameters. If the transform has a true inverse this
        is returned instead.

        :type: ``type(self)``
         N/A N/A ThinPlateSplines N/A self target N/A self source kernel N/A self kernel N/A N/A