text_proposal_connector.py 文件源码

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

项目:sceneReco 作者: bear63 项目源码 文件源码
def fit_y(self, X, Y, x1, x2):
        len(X)!=0
        # if X only include one point, the function will get line y=Y[0]
        if np.sum(X==X[0])==len(X):
            return Y[0], Y[0]
        p=np.poly1d(np.polyfit(X, Y, 1))
        return p(x1), p(x2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号