aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/readme.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/examples/readme.py b/examples/readme.py
index 82a27d8..8cf626c 100644
--- a/examples/readme.py
+++ b/examples/readme.py
@@ -14,12 +14,7 @@ x, y = Variable.from_names("x, y") # or just Variable("x")
k = Parameter("k")
p = (x + 2 * y) ** 3 + y ** 2 + k
-print(f"{p = }")
-
-# Expressions can be easily reparametrized
-w = Parameter("w")
-q = p.replace(y, w).replace(k, k ** 2)
-print(f"{q = }")
+print(f"{str(p) = }")
# Make a concrete representation
state = State(parameters={k: 3.14}) # try to replace with empty dict