【code】
import numpy as npnparr = np.array([[1 ,2, 3, 4]])np_int32 = nparr[0][0] # np_int=1py_int = 1234#打印类型print("type(py_int32)="+str(type(py_int32))) print("type(np_int)="+str(type(np_int)))#numpy 的int32 转 int64np_int64=np.int64(np_int )print("type(np_int64)="+str(type(np_int64)))
【result】
type(py_int)=type(np_int)= type(np_int64)=