An introduction to Numpy and Scipy
Install:
Import:
common:
import numpy as np
Basic instruction:
a = np.array([1,4,5,8],float);
can use slice etc.
a.shape
a.dtype
len(a)
a.reshape((2,2))
2 in a
a.copy()
a.tolist()
list(a)
a.tostring()
np.fromstring(s)
a.fill(0)
a.transpose()
a.flatten()
np.concatenate((a,b,c),axis = 0)
np.newaxis
np.arange(5,dtype = float)
np.ones((2,3),dtype = float)
np.zeros((2,3),dtype = float)
np.zeros_like(a)
np.ones_like(a)
np.identity(4,dtype = float)
np.eye(4,k=1,dtype = float)