In [2]:
import numpy as np
In [3]:
Out[3]:
In [7]:
Out[7]:
In [12]:
np.arange(1,101).reshape(10,10)/100
Out[12]:
In [15]:
np.linspace(0.01,1,100).reshape(10,10)
Out[15]:
In [16]:
np.linspace(0,1,20)
Out[16]:
In [17]:
mat = np.arange(1,26).reshape(5,5)
mat
Out[17]:
In [20]:
mat[2:,1:]
Out[20]:
In [21]:
mat[3,4]
Out[21]:
In [22]:
mat[:3]
Out[22]:
In [23]:
mat[:3,1:]
Out[23]:
In [24]:
mat[:3,1:2]
Out[24]:
In [25]:
mat.sum()
Out[25]:
In [26]:
mat
Out[26]:
In [ ]:
mat.sum(axis=0)
No comments:
Post a Comment