Hi all
Array can be implemented in Python using two methods
####Numpy
import numpy as np
hup=np.arange(10)
hup=np.zeros(10)
for i in range(10):
hup[i]=i**2
print(hup)
############
#Using List
a=[]
for i in range(10):
a.append(i**3)
print(a)
a = np.array([[1, 0],
[0, 1]])
b = np.array([[4, 1],
[2, 2]])
c=np.matmul(a, b)
print(c)
No comments:
Post a Comment