Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matrix pow python

>>> from numpy.linalg import matrix_power
>>> i = np.array([[0, 1], [-1, 0]]) # matrix equiv. of the imaginary unit
>>> matrix_power(i, 3) # should = -i
array([[ 0, -1],
       [ 1,  0]])
>>> matrix_power(i, 0)
array([[1, 0],
       [0, 1]])
>>> matrix_power(i, -3) # should = 1/(-i) = i, but w/ f.p. elements
array([[ 0.,  1.],
       [-1.,  0.]])
Comment

PREVIOUS NEXT
Code Example
Python :: python - remove scientific notation 
Python :: print two digits after decimal python 
Python :: list to json python 
Python :: pip install torch error 
Python :: python pendas shut off FutureWarning 
Python :: pd.set_option show all rows 
Python :: tkinter max size 
Python :: create an array with same value python 
Python :: python matplotlib plot thickness 
Python :: set window size tkinter 
Python :: pandas series to string without index 
Python :: DtypeWarning: Columns (47) have mixed types.Specify dtype option on import or set low_memory=False 
Python :: pandas plot xlabel 
Python :: opencv grayscale to rgb 
Python :: pip version command 
Python :: column string to datetime python 
Python :: .astype datetime 
Python :: plotly write html 
Python :: display full dataframe pandas 
Python :: on_ready discord.py 
Python :: selenium python switch to iframe 
Python :: isinstance numpy array 
Python :: nltk stop words 
Python :: Colored Print In Python 
Python :: python get last modification time of file 
Python :: python read file without newline 
Python :: matplotlib x axis at the top 
Python :: how to get all file names in directory python 
Python :: selenium get current url 
Python :: python image to pdf 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =