datafile.py 文件源码

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

项目:spyking-circus 作者: spyking-circus 项目源码 文件源码
def _unscale_data_from_float32(self, data):
        '''
            This function will convert data from float32 back to the original format of the file
        '''

        if numpy.any(self.gain != 1):
            data /= self.gain

        if self.dtype_offset != 0:
            data  += self.dtype_offset

        if (data.dtype != self.data_dtype) and (self.data_dtype != numpy.float32):
            data = data.astype(self.data_dtype)

        return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号