📜  在 python 代码示例中将 uint8 转换为 double

📅  最后修改于: 2022-03-11 14:45:40.190000             🧑  作者: Mango

代码示例2
# to create an x-bit point with numpy, use np.intx
# to create an unsigned x-bit point with numpy, use np.uintx
# examples:
import numpy as np

a = np.float64 (0.27745873 ) # 10000 stored as a 16-bit number (can store numbers from -32768 to 32767)
b = np.unit8 (a) # 10000 stored as an unsigned 16-bit number (can store numbers from 0 to 65535)