In [1]:
import numpy as np
In [2]:
from numpy.random import randint
In [3]:
za=np.arange(25)
In [4]:
za
Out[4]:
In [5]:
za.reshape(5,5)
Out[5]:
In [7]:
zb=za.reshape(5,5)
In [8]:
zb
Out[8]:
In [9]:
zb.max()
Out[9]:
In [10]:
za.max()
Out[10]:
In [11]:
za.min()
Out[11]:
In [12]:
za.argmax()
Out[12]:
In [13]:
zb.argmin()
Out[13]:
In [17]:
zc = np.random.randint(0,50,10)
In [19]:
zc
Out[19]:
In [18]:
zc.max()
Out[18]:
In [20]:
zc.min()
Out[20]:
In [21]:
zc.argmax()
Out[21]:
In [22]:
zc.argmin()
Out[22]:
In [25]:
zc.shape
Out[25]:
In [26]:
zb.shape
Out[26]:
In [27]:
zd=np.arange(100)
In [28]:
zd
Out[28]:
In [30]:
zd.shape
Out[30]:
In [31]:
zd.reshape(5,5)
In [32]:
zd.reshape(2,50)
Out[32]:
In [33]:
zd.reshape(2,50).shape
Out[33]:
In [34]:
zd.reshape(5,20)
Out[34]:
In [35]:
zd.reshape(5,20).shape
Out[35]:
In [ ]:
zd.shape
No comments:
Post a Comment