Я привязал, чтобы добавить переменные во вторую матрицу, которая не меняет тип, я не могу выяснить, какова разница между ними.
myu1, myu2, myu3 = np.random.uniform(0,0.5,3)
A = np.array([
[1,-1,-1,0,0,0,0,0,0,0],
[0,0,1,1,1,0,0,M1,0,0],
[0,0,0,0,0,0,0,1,0,-1],
[0,0,1,0,0,-1,0,0,-M2,0],
[0,1,0,0,0,0,0,0,0,0,0],
[0,0,1,0,0,0,1,0,0,M3],
[0,0,0,1,0,0,0,-M3,0,0],
[myu1,0,0,0,-1,0,0,0,0,0],
[0,myu2,0,0,0,-1,0,0,0,0],
[0,0,0,myu3,0,0,-1,0,0,0]
])
print(type(A[0]))
g= np.array([
[3,4,5,-1,5,6,7,7,8,9],
[5,6,7,-1,5,6,7,7,8,9],
[5,6,322,-1,5,6,7,7,8,9],
[3,4,5,-1,5,6,7,7,8,9],
[5,6,7,-1,5,6,7,7,8,9],
[5,6,322,-1,5,6,7,7,8,9],
[3,4,5,-1,5,6,7,7,8,9],
[5,6,7,-1,5,6,7,7,8,9],
[5,6,322,-1,5,6,7,7,8,9],
])
print(type(g[0]))