Week
Week
[[1.]
[2.]
[3.]
[4.]]
value of W is: [1.]
value of X is: [2.]
value of Y is: [3.]
value of Z is: [4.]
1
inverse of M is: [[-2. 1. ]
[ 1.5 -0.5]]
determinant of M is: -2.0000000000000004
eigen value of M is: [-0.37228132 5.37228132]
In [3]: A=np.array([1,2,3])
B=np.array([4,5,6])
np.concatenate((A,B),axis=0)
In [21]: a=np.zeros(100).reshape(10,10)
b=np.ones(10).reshape(1,10)
column=np.ones(12)[:, np.newaxis]
upper=np.concatenate((a,b),axis=0)
lower=np.concatenate((b,upper),axis=0)
left=np.concatenate((column,lower),axis=1)
ans=np.concatenate((left,column),axis=1)
ans
Out[21]: array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]])
Out[13]: 3.1415926535897936