coordinates.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:prysm 作者: brandondube 项目源码 文件源码
def resample_2d(array, sample_pts, query_pts):
    ''' Resamples 2D array to be sampled along queried points.

    Args:
        array (numpy.ndarray): 2D array.

        sample_pts (tuple): pair of numpy.ndarray objects that contain the x and y sample locations,
            each array should be 1D.

        query_pts (tuple): points to interpolate onto, also 1D for each array.

    Returns:
        numpy.ndarray.  array resampled onto query_pts via bivariate spline.

    '''
    xq, yq = np.meshgrid(*query_pts)
    interpf = interpolate.RectBivariateSpline(*sample_pts, array)
    return interpf.ev(yq, xq)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号