-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
💫 Good first issueGood for newcomersGood for newcomers🔨 MaintenanceMaintenance and upkeep improvementsMaintenance and upkeep improvements
Description
It might be an idea to perform doit() on UnevaluatedExpression classes while lambdifying. This removes the need to call doit() before creating a function, which is slow on large expressions (see #280).
Rough sketch:
class CustomNumPyPrinter(NumPyPrinter):
...
def _print_UnevaluatedExpression(self, expr, *args) -> str:
return self._print(expr.doit(deep=False))Note that this might still leaves classes like CG unevaluated. So those will need to be evaluated (doit()) as well. The idea is the same as above, but this could be implemented with a decorator, just like _forward_to_numpy_printer().
Metadata
Metadata
Assignees
Labels
💫 Good first issueGood for newcomersGood for newcomers🔨 MaintenanceMaintenance and upkeep improvementsMaintenance and upkeep improvements