import numpy as np a = np.diag(np.array([1,2,3])) print( a ) # [[1 0 0] # [0 2 0] # [0 0 3]]
CC-BY-SA 3.0 · Powered by MediaWiki
개인정보처리방침 · ABOUT