python库函数

PIL 中的 Image 模块

python opencv入门(读 / 写 显示以及转换图像 和 视频读入)

现在对于数据的处理更多的还是numpy。没有axis参数表示全部相加,axis=0表示按列相加,axis=1表示按照行的方向相加

1.  >>> import numpy as np  
2.  >>> a=np.sum([[0,1,2],[2,1,3]])  
3.  >>> a  
4.  9  
5.  >>> a.shape  
6.  ()  
7.  >>> a=np.sum([[0,1,2],[2,1,3]],axis=0)  
8.  >>> a  
9.  array([2, 2, 5])  
10.  >>> a.shape  
11.  (3,)  
12.  >>> a=np.sum([[0,1,2],[2,1,3]],axis=1)  
13.  >>> a  
14.  array([3, 6])  
15.  >>> a.shape  
16.  (2,)

你可能感兴趣的:(python库函数)