summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polymatrix/expressionstate/mixins.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/polymatrix/expressionstate/mixins.py b/polymatrix/expressionstate/mixins.py
index f5a0c25..5d26c89 100644
--- a/polymatrix/expressionstate/mixins.py
+++ b/polymatrix/expressionstate/mixins.py
@@ -64,7 +64,7 @@ class ExpressionStateMixin(
"""
Create an index for a variable, but does not return the index. If you
want the index use
- :py:meth:`polymatrix.expressionstate.mixins.ExpressionStateMixin.index`
+ :py:meth:`index`
"""
state, _ = self.index(var)
return state
@@ -90,7 +90,8 @@ class ExpressionStateMixin(
See also :py:meth:`get_indices`,
:py:class:`polymatrix.polymatrix.index.VariableIndex`.
"""
- yield from map(lambda i: VariableIndex(index=i, power=1), self.get_indices(var))
+ yield from (VariableIndex(index=i, power=1)
+ for i in self.get_indices(var))
def get_indices_as_monomial_index(self, var: Variable) -> Iterable[MonomialIndex]:
"""
@@ -99,7 +100,8 @@ class ExpressionStateMixin(
See also :py:meth:`get_indices`,
:py:class:`polymatrix.polymatrix.index.MonomialIndex`.
"""
- yield from map(lambda v: MonomialIndex((v,)), self.get_indices_as_variable_index(var))
+ yield from (MonomialIndex((v,))
+ for v in self.get_indices_as_variable_index(var))
def get_variable(self, index: int) -> Variable:
""" Get the variable object from its index. """