From 491bba1996c4992c579d7677f9f059ecc96e8d45 Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Wed, 21 Dec 2016 16:17:44 +0100 Subject: [PATCH] Moved moment stuff to new lbm module --- sympyextensions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sympyextensions.py b/sympyextensions.py index e89cf1374..d3b86fe58 100644 --- a/sympyextensions.py +++ b/sympyextensions.py @@ -317,3 +317,12 @@ def countNumberOfOperations(term): visit(term) return result + + +def matrixFromColumnVectors(columnVectors): + """Creates a sympy matrix from column vectors. + :param columnVectors: nested sequence - i.e. a sequence of column vectors + """ + c = columnVectors + return sp.Matrix([list(c[i]) for i in range(len(c))]).transpose() + -- GitLab