Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

identity matrix in python

#Change the value 3 to the size of the identity matrix
>>>np.identity(3)
array([[1.,  0.,  0.],
       [0.,  1.,  0.],
       [0.,  0.,  1.]])
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #identity #matrix #python
ADD COMMENT
Topic
Name
9+1 =