Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

np.eye

import numpy as np
 
a=np.eye(3)
print(a)
 
a=np.eye(4,k=1)
print(a)
 
a=np.eye(4,k=-1)
print(a)
 
a=np.eye(4,k=-3)
print(a)
Comment

PREVIOUS NEXT
Code Example
Python :: python square number 
Python :: numpy sqrt 
Python :: find length of string in python 
Python :: drop row with duplicate value 
Python :: all the symbols on a keyboard python list 
Python :: how to install python in ubuntu 
Python :: bar plot group by pandas 
Python :: python string ends with 
Python :: change value in excel in python 
Python :: compare times python 
Python :: rename keys in dictionary python 
Python :: sqlite operational error no such column 
Python :: python qt always on top 
Python :: hover show all Y values in Bokeh 
Python :: how to make timer in python 
Python :: selenium get h1 text python 
Python :: how to make a button in python 
Python :: python datetime move forward one day 
Python :: flask sending post request 
Python :: python 4 
Python :: Creating and writing to a new file 
Python :: Rectangle with python 
Python :: selenium.common.exceptions.TimeoutException: Message: 
Python :: installing required libraries in conda environment 
Python :: créer fonction python 
Python :: spanish to english 
Python :: delete variable python 
Python :: time in python code 
Python :: combine list of dicts 
Python :: how to install python library 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =