NumPy and Matplotlib
[Pages:26]NumPy and Matplotlib
Computer Science, CMU 204101 Introduction to Computer
1
Overview
NumPy (Numeric Python) Python (Array)
NumPy commercial software MatLab
NumPy Vector and matrix mathematics
Computer Science, CMU 204101 Introduction to Computer
2
Import NumPy module
import NumPy
import numpy
NumPy numpy.X np import
import numpy as np np.X
Computer Science, CMU 204101 Introduction to Computer
3
Arrays
Arrays NumPy list array int float
Arrays list
Array Vectors Matrices
Computer Science, CMU 204101 Introduction to Computer
4
Vector and Matrix
Vector
1
=
2 ...
1 -2
,
0.6 -4 9
Matrix
11 1
A=
1
1 3
2 4
Computer Science, CMU 204101 Introduction to Computer
5
array
Vector Matrix Array
Array list
import numpy as np
a = np.array([1,2,4,8],float) print(a)
[ 1. 2. 4. 8.]
type(a)
Array 1 Vector
Computer Science, CMU 204101 Introduction to Computer
6
array
array 2
list array array
array list
import numpy as np
a = np.array([1,2,4,8], float)
print(a[3])
8.0
a[0] = 5
print(a)
[ 5. 2. 4. 8.]
Computer Science, CMU 204101 Introduction to Computer
7
array
Array list comma
Array 2 Matrix
import numpy as np
a = np.array([[1,2,3],[4,5,6]],float)
print(a)
[[ 1. 2. 3.] [ 4. 5. 6.]]
print(a[0,0])
1.0
print(a[0,1])
2.0
Computer Science, CMU 204101 Introduction to Computer
8
................
................
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
- gurobi python interface matrix friendly modeling
- numpy and matplotlib
- matlab commands in numerical python numpy
- numpy ohio state university
- numerical computing in python cornell university
- python numpy tutorial
- introduction to numpy arrays github
- computer orange template
- numpy 2 marquette university
- numpy primer cornell university
Related searches
- numpy min and max
- scipy and numpy pdf
- numpy tutorial and practice
- matplotlib set x and y labels
- numpy where and condition
- numpy and or operator
- numpy array and operation
- difference between numpy array and list
- differences numpy list and array
- numpy and or
- numpy methods and attributes
- difference between numpy and pandas