preprocess.py 文件源码

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

项目:orange-infrared 作者: markotoplak 项目源码 文件源码
def compute_integral(self, x_s, y_s):
        y_s = y_s - self.compute_baseline(x_s, y_s)
        if len(x_s) == 0:
            return np.zeros((y_s.shape[0],)) * np.nan
        # avoid whole nan rows
        whole_nan_rows = np.isnan(y_s).all(axis=1)
        y_s[whole_nan_rows] = 0
        # select positions
        pos = x_s[np.nanargmax(y_s, axis=1)]
        # set unknown results
        pos[whole_nan_rows] = np.nan
        return pos
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号