FALL in/G.MA's 파이썬

[파이썬 Numpy] - 데이터 타입

쥐마 2016. 3. 28. 19:10


데이터타입(Datatypes) 


>>> import numpy as np


>>> x = np.array([1,2])

>>> print x.dtype # x의 데이터타입을 출력한다.

int64


>>> x = np.array([1.0,2.0])

>>> print x.dtype

float64


>>> x = np.array([1,2],dtype = np.int64) # 특정 데이터타입으로 지정한다.

>>> print x.dtype

int64