signal.py 文件源码

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

项目:asammdf 作者: danielhrisca 项目源码 文件源码
def __apply_func(self, other, func_name):

        if isinstance(other, Signal):
            time = np.union1d(self.timestamps, other.timestamps)
            s = self.interp(time).samples
            o = other.interp(time).samples
            func = getattr(s, func_name)
            s = func(o)
        elif other is None:
            s = self.samples
            time = self.timestamps
        else:
            func = getattr(self.samples, func_name)
            s = func(other)
            time = self.timestamps
        return Signal(s,
                      time,
                      self.unit,
                      self.name,
                      self.info)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号