[SciPy-dev] new buld process in CVS

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Jan 10 10:19:40 CST 2002


>>>>> "eric" == eric  <eric at scipy.org> writes:

    >> complication of a conflict.  I'd suggest placing user configs
    >> in a separate file that is not in the CVS tree.

    eric> Good idea.  Maybe the setup.cfg file is a good choice.

    eric> I'm hoping that the atlas_info script gets more itelligent
    eric> -- perhaps asking you for the path if it can't find it.  It
    eric> could then generate the file for you.  If it didn't find the

That sounds like a good idea.

    eric> library, in the best scenarios, it would download it from
    eric> the scipy website.  This is probably a little ways out
    eric> though.

Maybe once ciphon (http://sourceforge.net/projects/pythonsiphon/) gets
good enough we could use it.

Also, I noticed on the weave documentation page that you were looking
for a way to check if given an xterm if there is an X11 display
available.  The easiest way to do this is to check for the DISPLAY env
variable.

In [1]: import os
In [2]: print os.environ['DISPLAY']
:0.0

On a remote telnet session this will cause a KeyError.

$ python -c "import os; print os.environ.get('DISPLAY')"
None

Eric, weave.blitz is fantastic!  Great job!!  I haven't really checked
out weave.inline yet but like blitz a lot. :)

One thing I thought I'd mention.  I'm sure you are aware of this but I
think it worthy of mention.  When you use blitz for an expression the
computation is different from that when done by numeric.  blitz will
use the computed values immediately (Gauss-Siedel) while numeric will
make a copy and do the computation (Gauss-Jordan).  This means that
sometimes the result of a computation when done by exec(expr) will be
different from that of blitz(expr).  Here is an example.

# 4 point average.
>>> expr = "u[1:-1, 1:-1] = (u[0:-2, 1:-1] + u[2:, 1:-1] + "\
...                "u[1:-1,0:-2] + u[1:-1, 2:])*0.25"
>>> u = zeros((5, 5), 'd'); u[0,:] = 100
>>> exec (expr)
>>> u
array([[ 100.,  100.,  100.,  100.,  100.],
       [   0.,   25.,   25.,   25.,    0.],
       [   0.,    0.,    0.,    0.,    0.],
       [   0.,    0.,    0.,    0.,    0.],
       [   0.,    0.,    0.,    0.,    0.]])

>>> u = zeros((5, 5), 'd'); u[0,:] = 100
>>> weave.blitz (expr)
>>> u
array([[ 100.  ,  100.       ,  100.       ,  100.       ,  100. ],
       [   0.  ,   25.       ,   31.25     ,   32.8125   ,    0. ],
       [   0.  ,    6.25     ,    9.375    ,   10.546875 ,    0. ],
       [   0.  ,    1.5625   ,    2.734375 ,    3.3203125,    0. ],
       [   0.  ,    0.       ,    0.       ,    0.       ,    0. ]])


This is not a bad thing at all but worth knowing, IMHO.

prabhu



More information about the Scipy-dev mailing list