From 9df9580d42a840f0aea96e1253f1499179f06422 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Sun, 6 Oct 2019 00:50:53 -0500 Subject: [PATCH 1/3] Fix silly mistake in Flat constructor Previously, checking for membership in map object would exhaust the generator and result in a trivial Flat. --- clifford/cga.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clifford/cga.py b/clifford/cga.py index 2c11518f..9ebd0e8f 100644 --- a/clifford/cga.py +++ b/clifford/cga.py @@ -164,7 +164,7 @@ def __init__(self,cga, *args): # from vectors on flat else: - nulls = map(self.cga.null_vector,args) + nulls = list(map(self.cga.null_vector,args)) if self.einf not in nulls: nulls = list(nulls)+[self.einf] From 3a5c7ec592709fdd78c4c70019bb7e1cf59928b1 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Sun, 6 Oct 2019 01:10:05 -0500 Subject: [PATCH 2/3] Update cga.py Don't return 0 if a scalar multiple of einf is in the constructor --- clifford/cga.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clifford/cga.py b/clifford/cga.py index 9ebd0e8f..e7a55eef 100644 --- a/clifford/cga.py +++ b/clifford/cga.py @@ -165,10 +165,8 @@ def __init__(self,cga, *args): # from vectors on flat else: nulls = list(map(self.cga.null_vector,args)) - if self.einf not in nulls: - nulls = list(nulls)+[self.einf] - - self.mv = reduce(op,nulls) + self.mv = reduce(op,nulls) + self.mv = op(self.mv, self.einf) or self.einf self.mv = self.mv.normal() From d64229fc99d5f27e31ccc504f96e1b441e54a95f Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Wed, 9 Oct 2019 12:17:47 -0500 Subject: [PATCH 3/3] Update cga.py --- clifford/cga.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clifford/cga.py b/clifford/cga.py index e7a55eef..c312db82 100644 --- a/clifford/cga.py +++ b/clifford/cga.py @@ -166,7 +166,7 @@ def __init__(self,cga, *args): else: nulls = list(map(self.cga.null_vector,args)) self.mv = reduce(op,nulls) - self.mv = op(self.mv, self.einf) or self.einf + self.mv = op(self.mv, self.einf) or self.mv self.mv = self.mv.normal()