car.py 文件源码

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

项目:keras-gp 作者: alshedivat 项目源码 文件源码
def construct_lanes(data, pts_per_lane):
    poly_x, poly_y = data[:,:4], data[:,4:]
    lane_x = np.vstack(
        [np.polyval(poly_x[t], np.linspace(0, 50, pts_per_lane))
         for t in xrange(poly_x.shape[0])])
    lane_y = np.vstack(
        [np.polyval(poly_y[t], np.linspace(0, 50, pts_per_lane))
         for t in xrange(poly_y.shape[0])])
    lane = np.hstack([lane_x, lane_y])
    nnz = lane_x.sum(axis=1) > 0.
    return lane, nnz
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号