Created
August 16, 2021 00:02
-
-
Save aleozlx/955e03bc5dbfeda2e02c9e80d18bb80a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
np.random.seed(123) | |
A = np.random.randint(5, size=3*5).reshape(3, 5) | |
print("A =\n", A) | |
B = np.random.randint(5, size=5*4).reshape(5, 4) | |
print("B =\n", B) | |
C = np.dot(A, B) | |
print("C =\n", C) | |
""" | |
OUTPUT | |
============= | |
A = | |
[[2 4 2 1 3] | |
[2 3 1 1 0] | |
[1 1 0 0 1]] | |
B = | |
[[3 4 0 0] | |
[4 1 3 2] | |
[4 2 4 0] | |
[0 1 3 4] | |
[4 4 1 3]] | |
C = | |
[[42 29 26 21] | |
[22 14 16 10] | |
[11 9 4 5]] | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment