Calculation with python:
import numpy as npResult:
from scipy import linalg
A = np.array([[13,9,7],[8,7,4],[6,4,0]])
B = np.array([[0,0,0],[0,0,0],[0,0,0]])
print(A.dot(B))
[[0 0 0]
[0 0 0]
[0 0 0]]
Using numpy to create zero matrix:
import numpy as npResult :
a = np.zeros((10,3))
print(a)
print("--------------")
b = a.T
print(b)
print("--------------")
c = np.reshape(b,(5,6))
print(c)
[[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
--------------
[[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]
--------------
[[ 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]]
No comments :
Post a Comment