a quickie: range - x

2006-11-29 Thread rjtucke
I want an iterable from 0 to N except for element m (<=M).
I could write
x = range(N)
x.remove(m)
but I want it in one expression.

Thanks,
Ross

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: a quickie: range - x

2006-11-29 Thread rjtucke
Thanks, all- that helped.
Ross

-- 
http://mail.python.org/mailman/listinfo/python-list


Quantum term project code- for interest and for help

2007-02-22 Thread rjtucke
Hello all,
I have written a numerical simulation of a Bose Einstein Condensate in
Python for a term project in my Quantum III class at Arizona State.
You may find it at 
https://wiki.asu.edu/phy416/index.php/A_Simple_Bose-Einstein_Condensate_Simulation

I post this for two reasons- first, as a matter of interest to any
physics majors / professors out there, and second, because it is so
_slow_ that the FORTRAN version runs ~180 times faster. I have used
the profiler, and can't seem to speed it up at all. Any thoughts? I am
now trying to port it to C, with mixed results. Finally, if you have
any thoughts for how to tighten it up OR to make it more _readable_
(it is supposed to be an educational tool, after all), I would greatly
appreciate it. Thanks,

rjtucke

-- 
http://mail.python.org/mailman/listinfo/python-list