diff options
author | Nao Pross <np@0hm.ch> | 2024-03-18 21:39:06 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-03-18 21:39:06 +0100 |
commit | 2c0f98afe5ddaea85f8126254f6a163e8d6458d7 (patch) | |
tree | e7bdf09284c20bd08e19e625ba1f67b19c9626fa | |
parent | Fix regressions from refractor (diff) | |
download | mdpoly-2c0f98afe5ddaea85f8126254f6a163e8d6458d7.tar.gz mdpoly-2c0f98afe5ddaea85f8126254f6a163e8d6458d7.zip |
Remove use of replace from example
-rw-r--r-- | examples/readme.py | 7 |
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 |