smichr on master
Impoved simplification for sign… Made suggested changes Update sympy/functions/elementa… and 6 more (compare)
oscarbenjamin on master
printing: Update the example to… Convert the example to a doctes… Merge pull request #19622 from … (compare)
oscarbenjamin on sympy-1.6.1
nsimplify(x+1.0, rational=True)should be faster as well (looks like it just iterates over expr.atoms(Float))
ah, thanks @ehren . This is worth a shot!
Thanks for your answers and ideas. In short
o prevent the Float getting in there in the first place.
This one is only partially doable as it will depend what users do. So we can control some of it but it is very likely we will end up with Float no matter what.
Yes we tried this one, I found out that this is still quite slower than brute force sympify+xreplace atoms. (a small test on
x + 2.0 benchmarks nsimplify at ~2.5ms and brtute force at ~25.6 µs ). If it was a one time thing we would definitely go the
nsimplify that is a lot nicer, however we touch this line thousands of times in some cases and speed is critical.
collector one of its sibling functions)
series()I would appreciate if those of you who might have an idea of which patch might be at fault (again, happened within the past 24 hours), to share that info with me. Thanks!
Is there a way to specify that the identity operator must act as identity also on the adjoint operators?
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.operator import Operator
from sympy.physics.quantum import IdentityOperator
A = Operators('A')
Identity = IdentityOperator()
A * Identity #This gives A, correctly
B = Dagger(A)
B * Identity #This returns A^\dagger I . so it does not remove the identity operator