1. 程式人生 > >numpy array的資料型別

numpy array的資料型別

在使用array函式構造陣列時,需要指定資料型別dtype
以下為dtype的常用型別
bool8 8 bits

int8 8 bits
int16 16 bits
int32 32 bits
int64 64 bits

uint8 8 bits
uint16 16 bits
uint32 32 bits
uint64 64 bits

float16 16 bits
float32 32 bits
float64 64 bits
float96 96 bits,
float128 128 bits

complex64 two 32-bit floats
complex128 two 64-bit floats
complex192 two 96-bit floats
complex256 two 128-bit floats