aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-03 23:20:04 +0100
committerNao Pross <np@0hm.ch>2024-03-03 23:20:04 +0100
commitb553cd249eb9a77ef4235c12c930509f49d1ab19 (patch)
treeb821e78f096cb6fc2e193fc3ead171f6e85e532a
parentImprove algebra.binary_operator decorator (diff)
downloadmdpoly-b553cd249eb9a77ef4235c12c930509f49d1ab19.tar.gz
mdpoly-b553cd249eb9a77ef4235c12c930509f49d1ab19.zip
Reword docstrings
Diffstat (limited to '')
-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