179

//2017/111/numpy 21.12.2016 10:45:00.

numpy

-,     https://www.continuum.io/downloads
(  python 3.5,  x64,   64- )


-,  IDE PyCharm, ,   .
—     .
hot key:
Ctrl+Alt+E —   
Shift+Ctrl+F10 —  


 :
  ,   tutorial: https://docs.scipy.org/doc/num[..]user/quickstart.html


  https://pythonworld.ru/numpy/1.html





01.

n. n  n

02.  

n. n  n,
    0  n-1,   0

03.  

n. n  n,
     0  n-1,   0

04.

n, r, c. n  n,  
  r  c  1,   0

05.

n. n  n,
    1,  

06.

n, r, c. n  n,  
    R-   C- 1

07.

n. n  n,
  .

08.

n.   . n  n,
      1.

09.

w  h 
   .
,    .
    ,   ,
        .

10.

: 30x60g  30x60c.   numpy-  
from skimage import io
img = io.imread('30x60g.png')
 
from skimage import io
io.imsave('res.png', img)
      .

11.

 / , 6060,  30120.   .
    .

12.

 /    10 .   .
  .
    (  , 10 )

13.

   10 ( 12- ).

14.

100100 .
    (x1,y1)   (x2,y2).
  ( ,    ).

15.

HxW   k.
k        kxW.

16.


17.  

(6,7,8). (x,y,z) ?

18.

,  , 3  8

19.  

.  , ,  -1.

20.

   

21.


22. argsort

,    ,

23. argsort – 2

  N.   ,   – ,   – . ,      .

24.

. (X -> aX+b)  ,     [0,1]   0  1 . ,      .




matplotlib


: http://nbviewer.jupyter.org/gi[..]_python/tree/master/


1

: ,      ,    .
  :


py vs gmp 2


2


from sklearn import datasets
iris = datasets.load_iris()