I hereby claim:
- I am chtmorris on github.
- I am chtmorris (https://keybase.io/chtmorris) on keybase.
- I have a public key ASAIRAIlv87UgA7CL-szvuD8Co-IVRqcqsqkC0yCmty20go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
0x005b661B34Cb13E4023A26048eB6440a9e1d611B |
# Import required libraries | |
from __future__ import division | |
import sys | |
import csv | |
# Start a counter and store the textfile in memory | |
lines = sys.stdin.readlines() | |
lines.pop(0) | |
# Get max_age to determine number of lines needed |
import numpy as np | |
def identityMatrix(rows): | |
''' | |
Create an empty matrix list | |
Append new rows of 0s to the list, with the number of elements dependent on the number of rows | |
Substitute a 1 for a 0 in the place of matrix[x][x] | |
Use numpy to pretify it |
import numpy as np | |
# Define matrix and vector | |
vector = [1, 2, 3, 4] | |
matrix = [ [1, 2, 3, 4], | |
[5, 6, 7, 8], | |
[9, 0, 1, 2] ] | |
# Function 1 | |
def vectorMatrixMultiplication(matrix,vector): |