Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import print_function
- import numpy as np
- x = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]).reshape(3,4)
- q = np.array([3, 4, 5, 6, 7, 8]).reshape(3,2)
- print(x)
- print(q)
- ans = np.dot(x.T,q)
- print(ans)
- print(ans.flatten())
- [[ 0 1 2 3]
- [ 4 5 6 7]
- [ 8 9 10 11]]
- [[3 4]
- [5 6]
- [7 8]]
- [[ 76 88]
- [ 91 106]
- [106 124]
- [121 142]]
- [ 76 88 91 106 106 124 121 142]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement