From 847b438603127dd7213cef471bdfe4c1671d8524 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 4 Apr 2019 12:34:37 +0200 Subject: numpy and tensorflow stuff --- python/transpose.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 python/transpose.py (limited to 'python') 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()) + -- cgit v1.2.3