Skip to content

Commit

Permalink
fix: lambdify argument of sqrt
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Jun 10, 2021
1 parent fc08ab8 commit 0559c94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/report/001.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@
" _module = \"jax\"\n",
"\n",
" def _print_ComplexSqrt(self, expr: sp.Expr) -> str:\n",
" return \"select([less(x, 0), True], [1j * sqrt(-x), sqrt(x)], default=nan,)\""
" arg = expr.args[0]\n",
" x = self._print(arg)\n",
" return f\"select([less({x}, 0), True], [1j * sqrt(-{x}), sqrt({x})], default=nan,)\""
]
},
{
Expand Down

0 comments on commit 0559c94

Please sign in to comment.