Hi everyone,

I just did a rebase of my final pull request because there were some merge
conflicts, and I'm not getting a strange doctest failure that I don't
understand.

When I run ./bin/doctest, it tells me that this doctest (
https://github.com/lazovich/sympy/blob/represent2/sympy/physics/quantum/piab.py#L80)
is failing, giving:

Failed example:
    represent(p_bra*XOp()*p, basis=XKet)
Expected:
    L/2
Got:
    L/(2*pi**2*n**2) + 2*(L**2/4 - L**2/(4*pi**2*n**2))/L

If you look at the top of piab.py, L carries the positive assumption with
it. If you work this expression out by hand, you'll see it simplifies to
L/2.

The strange part, though, is that I get the correct L/2 output when I run it
myself at the command line, both in the python terminal and in isympy:

>>> from sympy.physics.quantum import *>>> from sympy.physics.quantum.piab 
>>> import *>>> p = PIABKet()>>> p_bra = PIABBra()>>> represent(p_bra*XOp()*p, 
>>> basis=XKet)L/2

 Any idea why there would be a discrepancy between what I run in my terminal
and the result from doctesting?

Thanks for your help!

Tomo

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to