summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPatrick Simianer <pks@pks.rocks>2019-04-04 12:34:37 +0200
committerPatrick Simianer <pks@pks.rocks>2019-04-04 12:34:37 +0200
commit847b438603127dd7213cef471bdfe4c1671d8524 (patch)
tree543fbb06472a60f01aee6a75d6cde2a383daaef3 /python
parentcd792b182dc2f641b9eb79c54db76da98b69c59a (diff)
numpy and tensorflow stuff
Diffstat (limited to 'python')
-rw-r--r--python/transpose.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/transpose.py b/python/transpose.py
new file mode 100644
index 0000000..464194a
--- /dev/null
+++ b/python/transpose.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import numpy as np
+
+m = np.matrix('1 2; 4 5; 7 8; 9 10') # 3 x 2
+v = np.matrix('1 2 3 4') # 1 x 3
+print(m)
+print(v)
+print(v*m)
+print((m.transpose()*v.transpose()).transpose())
+