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
评论列表
文章目录