# we simply undo the basis_normalizer scaling that we
# performed earlier.
#
- # TODO: make this access safe.
- XS = a[0].variables()
+ # The a[0] access here is safe because trivial algebras
+ # won't have any basis normalizers and therefore won't
+ # make it to this "else" branch.
+ XS = a[0].parent().gens()
subs_dict = { XS[i]: self._basis_normalizers[i]*XS[i]
for i in range(len(XS)) }
return tuple( a_i.subs(subs_dict) for a_i in a )