Lower an expression completely This calls the ``lower_once`` method in a loop until nothing changes. This function does not apply any other optimizations (like ``simplify``). Returns ------- expr: output expression See Also
(self)
| 495 | return lowered.setdefault(self._name, out) |
| 496 | |
| 497 | def lower_completely(self) -> Expr: |
| 498 | """Lower an expression completely |
| 499 | |
| 500 | This calls the ``lower_once`` method in a loop |
| 501 | until nothing changes. This function does not |
| 502 | apply any other optimizations (like ``simplify``). |
| 503 | |
| 504 | Returns |
| 505 | ------- |
| 506 | expr: |
| 507 | output expression |
| 508 | |
| 509 | See Also |
| 510 | -------- |
| 511 | Expr.lower_once |
| 512 | Expr._lower |
| 513 | """ |
| 514 | # Lower until nothing changes |
| 515 | expr = self |
| 516 | lowered: dict = {} |
| 517 | while True: |
| 518 | new = expr.lower_once(lowered) |
| 519 | if new._name == expr._name: |
| 520 | break |
| 521 | expr = new |
| 522 | return expr |
| 523 | |
| 524 | def _lower(self): |
| 525 | return |