From 558aba3b975c6cfa07b351a2a8f3587bcd4ce4c6 Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Tue, 29 Jan 2019 14:16:57 +0100
Subject: [PATCH] New free energy formulation works - produces same result as
 before

---
 field.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/field.py b/field.py
index cce2b91ed..c24bdc1c4 100644
--- a/field.py
+++ b/field.py
@@ -347,8 +347,8 @@ class Field:
     def center_vector(self):
         index_shape = self.index_shape
         if len(index_shape) == 0:
-            return self.center
-        elif len(index_shape) == 1:
+            return sp.Matrix([self.center])
+        if len(index_shape) == 1:
             return sp.Matrix([self(i) for i in range(index_shape[0])])
         elif len(index_shape) == 2:
             def cb(*args):
-- 
GitLab