https://docs.scipy.org/doc/numpy/user/quickstart.html
import numpy as np
a = np.array([1,2,3,4,5,6,7])
alist = list(a)
print( a.ndim )
print( a.shape )
print( a.size )
b = np.arange(x1,x2,dx)
b.reshape(ny, nx)
np.zero( (ny,nx) )
np.ones( (ny,nx) )
np.empty( (ny,nx) )
np.linspace( x1,x2,numpts )
h = np.hstack( (a,a,a,...) )
v = np.vstack( (a,a,a,...) )
# subset
c = d[ 1:5, 2:4, ...]
a.ravel() # flattened array
a.T # transpose
view, shallow/deep copy
'Coding > Python Matlab' 카테고리의 다른 글
matlab global variable (0) | 2019.01.05 |
---|---|
TIF 및 이미지 다루기 (0) | 2018.11.14 |
Anaconda on Win XP 32bit (0) | 2017.11.15 |
python 2 vs 3 (0) | 2017.10.28 |
deepcopy (0) | 2017.10.07 |