From 2059f876b49d2c2bc8995ec751b02ccc5761793a Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sat, 2 May 2020 16:19:29 +0100 Subject: [PATCH] Avoid checking whether the basis blades are blades (#275) Cherry-picked from @meuns' branch. Co-authored-by: meuns --- galgebra/mv.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/galgebra/mv.py b/galgebra/mv.py index 11976608..b4b03048 100644 --- a/galgebra/mv.py +++ b/galgebra/mv.py @@ -984,12 +984,10 @@ def blade_coefs(self, blade_lst=None): if blade_lst is None: blade_lst = self.Ga.mv_blades.flat - - # print 'Enter blade_coefs blade_lst =', blade_lst, type(blade_lst), [i.is_blade() for i in blade_lst] - - for blade in blade_lst: - if not blade.is_base() or not blade.is_blade(): - raise ValueError("%s expression isn't a basis blade" % blade) + else: + for blade in blade_lst: + if not blade.is_base() or not blade.is_blade(): + raise ValueError("%s expression isn't a basis blade" % blade) blade_lst = [x.obj for x in blade_lst] coefs, bases = metric.linear_expand(self.obj) coef_lst = []