From 51b550f1a216054752907b0b2974fa2321439073 Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Thu, 8 Jun 2017 18:02:38 +0200 Subject: [PATCH] Wolf Gladrow equilibirum construction --- sympyextensions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sympyextensions.py b/sympyextensions.py index e567d9cd8..489849ca7 100644 --- a/sympyextensions.py +++ b/sympyextensions.py @@ -16,6 +16,10 @@ def allIn(a, b): return all(element in b for element in a) +def scalarProduct(a, b): + return sum(a_i * b_i for a_i, b_i in zip(a, b)) + + def normalizeProduct(product): """ Expects a sympy expression that can be interpreted as a product and -- GitLab