aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdpoly/abc.py4
-rw-r--r--mdpoly/types.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/mdpoly/abc.py b/mdpoly/abc.py
index 618d3cd..4bc2afa 100644
--- a/mdpoly/abc.py
+++ b/mdpoly/abc.py
@@ -67,8 +67,8 @@ class Expr(Protocol):
# Suppose we want to consider only x as variable to reduce poly_2d
# to a one-dimensional polynomial
- yp = Parameter("y")
- poly_1d = poly_2d.replace(y, yp)
+ y_p = Parameter("y_p")
+ poly_1d = poly_2d.replace(y, y_p)
It can also be used for more advanced replacements since ``old`` and
``new`` are free to be any expression.
diff --git a/mdpoly/types.py b/mdpoly/types.py
index 7a50551..cb0213e 100644
--- a/mdpoly/types.py
+++ b/mdpoly/types.py
@@ -183,7 +183,7 @@ class PolyIndex(tuple[PolyVarIndex]):
@classmethod
def differentiate(cls, index: Self, wrt: int) -> Optional[Self]:
- """ Compute the index of differentiation
+ """ Compute the index after differentiation
For example if the index is :math:`xy^2` and ``wrt`` is the index of
:math:`y` this function returns the index of :math:`xy`. In particular