Skip to content

Commit f03b79f

Browse files
authored
Make blade_superscripts a GradedTuple too (#246)
Primarily motivating by saving a bunch of lines. This attribute is undocumented, so it shouldn't matter if we change it.
1 parent 9668d45 commit f03b79f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

galgebra/ga.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -870,14 +870,9 @@ def _build_bases(self):
870870
else:
871871
self.basis_super_scripts = [str(coord) for coord in self.coords]
872872

873-
self.blade_super_scripts = []
874-
875-
for grade_index in self.indexes:
876-
super_scripts = []
877-
for base_index in grade_index:
878-
super_scripts.append(''.join([self.basis_super_scripts[i]
879-
for i in base_index]))
880-
self.blade_super_scripts.append(super_scripts)
873+
self.blade_super_scripts = self.indexes._map(lambda base_index: ''.join(
874+
self.basis_super_scripts[i] for i in base_index
875+
))
881876

882877
if self.debug:
883878
printer.oprint('indexes', self.indexes, 'list(indexes)', self.indexes.flat,

0 commit comments

Comments
 (0)