import numpy as np a = np.array([[2,1],[10,5]]) print(a) print(a[:,1])#col 1 print(a[1])#row 1 print(a[1,1]) #a[1][1] print(a[0:1,0:1]) row 0:1 col 0:1 # u, d, v = np.linalg.svd(a)
[[ 2 1]
[10 5]]
[1 5]
[10 5]
5
[[2]]
[Finished in 0.3s]
原文地址:https://www.cnblogs.com/adong7639/p/9291048.html
时间: 2024-10-06 23:52:20