'Apply the warp.
Parameters
pts : shape (n_transform, 3)
Source points to warp to the destination.
Returns
dest : shape (n_transform, 3)
The transformed points.'

@verbose
def transform(self, pts, verbose=None):

    logger.info(('Transforming    %s    points' % (len(pts),)))
    from scipy.spatial.distance import cdist
    assert (pts.shape[1] == 3)
    out = np.zeros_like(pts)
    n_splits = max(int(((pts.shape[0] * self._destination.shape[0]) / (100000000.0 / 8.0))), 1)
    for (this_out, this_pts) in zip(np.array_split(out, n_splits), np.array_split(pts, n_splits)):
        dists = _tps(cdist(this_pts, self._destination, 'sqeuclidean'))
        L = np.hstack((dists, np.ones((dists.shape[0], 1)), this_pts))
        this_out[:] = np.dot(L, self._weights)
    assert (not (out == 0).any())
    return out
