Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

numpy identity matrix

>>> np.identity(3)
array([[1.,  0.,  0.],
       [0.,  1.,  0.],
       [0.,  0.,  1.]])
Comment

identity matrix with numpy

>>> np.eye(3)
array([[1.,  0.,  0.],
       [0.,  1.,  0.],
       [0.,  0.,  1.]])
Comment

PREVIOUS NEXT
Code Example
Python :: model.predict python 
Python :: shift in python 
Python :: false in py 
Python :: python dataframe reihe anzeigen 
Python :: normalizer in sklearn 
Python :: assert with message python 
Python :: how to create dictionary in python 
Python :: detect gender from name 
Python :: gcd python 
Python :: check if a word is a noun python 
Python :: infinite while loop in python 
Python :: how to make an array python 
Python :: python ceil method 
Python :: configuring tailwindcss, vue and laravel 
Python :: Adding a new column in pandas dataframe from another dataframe with different index 
Python :: filter in python 
Python :: python classes and objects 
Python :: declaring array size python 
Python :: python string: .format() 
Python :: pysimplegui get value from textbox 
Python :: python loop 
Python :: while loop with if else 
Python :: sample hierarchical clustering 
Python :: how to convert string into list in python 
Python :: return the first occurence of duplicates pandas 
Python :: assign exec function to variable python 
Python :: select each two elements on a list python 
Python :: python change all values in nested list 
Python :: docker compose cron 
Python :: python environment 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =