ESCI 386 Scientific Programming, Analysis and Visualization with Python
ESCI 386 ? Scientific Programming, Analysis and Visualization with Python
Lesson 18 - Linear Algebra
1
Matrix Operations
? In many instances, numpy arrays can be thought of as matrices.
? In the next slides we explore some matrix operations on numpy arrays
2
Determinants
? The determinant of an array is found by using the det() function from the scipy.linalg module.
>>> import scipy.linalg as slin >>> a array([[ 3, -5, 8],
[-1, 2, 3], [-5, -6, 2]]) >>> slin.det(a) 259.0
3
Trace
? The trace of an array is found by using the trace() function from numpy.
>>> import numpy as np >>> a array([[ 3, -5, 8],
[-1, 2, 3], [-5, -6, 2]]) >>> np.trace(a) 7
4
Trace (cont)
? Offset traces can also be computed.
>>> a array([[ 3, -5, 8],
[-1, 2, 3], [-5, -6, 2]]) >>> np.trace(a,-1) -7 >>> np.trace(a,1) -2
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- esci 386 scientific programming analysis and visualization with python
- numpy rip tutorial
- gurobi python interface matrix friendly modeling techniques
- an introduction to numpy and scipy virginia tech
- matrix operations with python and numpy nebomusic
- an introduction to numpy and scipy ucsb college of engineering
- numpy primer
- python for data science cheat sheet lists also see numpy arrays
- python for data science cheat sheet subsetting بايثونات
- numpy for matlab users
Related searches
- scientific trivia questions and answers
- scientific method vocabulary and definitions
- java programming problems and solutions
- programming languages and their uses
- best scientific programming languages
- scientific programming language
- scientific programming languages ranking
- scientific programming journal
- scientific method steps and definitions
- scientific notation rules and examples
- java programming questions and answers
- programming symbols and their meaning