First version of lab_matrices
This commit is contained in:
22
matrices.py
Normal file
22
matrices.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# This script defines the matrices from the lab using numpy
|
||||
# You should run it by calling `python -i matrices.py`
|
||||
|
||||
import numpy as np
|
||||
|
||||
a = np.array([[1, 2, 3]])
|
||||
B = np.array([[6, 1],[1, 4]])
|
||||
C = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
|
||||
D = np.array([[1, 1], [2, 2], [3, 3]])
|
||||
E = np.array([[1, 2], [1, 2], [1, 2]])
|
||||
|
||||
print("The following matrices are defined:")
|
||||
print('a')
|
||||
print(a)
|
||||
print('B')
|
||||
print(B)
|
||||
print('C')
|
||||
print(C)
|
||||
print('D')
|
||||
print(D)
|
||||
print('E')
|
||||
print(E)
|
||||
Reference in New Issue
Block a user