In [1]:
import numpy as np
In [3]:
a=[1,2,3]
b=["ram","sur","nai"]
c=["hi","plz","subcribe"]
In [4]:
a
Out[4]:
In [5]:
b
Out[5]:
In [6]:
c
Out[6]:
In [9]:
z=np.array([a,b,c])
In [10]:
z
Out[10]:
In [11]:
print(z)
In [12]:
z[2,1]
Out[12]:
In [13]:
mat1=np.array([a,b,c])
In [14]:
mat1
Out[14]:
In [15]:
print(mat1)
In [16]:
mat1[1,1]
Out[16]:
In [17]:
mat1[2,1]
Out[17]:
In [18]:
mat1[1,2]
Out[18]:
In [24]:
arra1=np.arange(1,21)
In [25]:
arra1
Out[25]:
In [27]:
mat2=np.reshape(arra1,(4,5) )
In [28]:
mat2
Out[28]:
In [29]:
mat3=np.reshape(arra1,(4,5),order="F")
In [30]:
mat3
Out[30]:
In [31]:
mat3[0,0]
Out[31]:
In [37]:
arra1.reshape(5,4,order="C")
Out[37]:
In [38]:
mat3.min()
Out[38]:
In [39]:
mat1.min()
In [40]:
mat1
Out[40]:
No comments:
Post a Comment