Open aaron-skydio opened 2 years ago
The PythonCodePrinter spits out this nonsense for sign, because math.copysign(1, x) wouldn't give 0 for x == 0:
math.copysign(1, x)
x == 0
0.0 if x[4] - 1 == 0 else math.copysign(1, x[4] - 1)
When a lot of these are used like in logic.py it really blows up numba's compilation time; it would be nice if we could do something more efficient for those.
logic.py
The PythonCodePrinter spits out this nonsense for sign, because
math.copysign(1, x)
wouldn't give 0 forx == 0
:When a lot of these are used like in
logic.py
it really blows up numba's compilation time; it would be nice if we could do something more efficient for those.