[Numpy-discussion] yorick zcen et al

David J Strozzi strozzi2@llnl....
Thu May 14 13:52:17 CDT 2009


Sorry to not include a subject last time, or provide more info on yorick:

http://yorick.sourceforge.net/index.php   official
http://www.maumae.net/yorick/doc/index.php   unofficial

It's basically an interpreter geared toward doing numerics, with 
C-like syntax (but Fortran array indexing) and very elegant multi-D 
array syntax.  It's also quite fast, has a parallel MPI package, and 
is used at LLNL to steer some big numerical codes where the 'guts' 
are in C.  Also has a graphics package called gist.  It's a free, 
open-source, bare-bones matlab, written by David Munro of LLNL 
starting in I think the late 1980s.

At the risk of being glib, I find the current science tools in python 
(numpy, scipy, matplotlib) to be a good beta version of yorick :)

Anyway, my point was there are a lot of standard grid gymnastics, of 
which numpy's diff() and sum() are examples, which don't seem to be 
in numpy, like yorick's zcen (zone centering) and pcen (point 
centering).  Rather than everyone write their own, perhaps they could 
be included?  Unless they're in numpy and I can't find where.

Dave [Strozzi, not Munro]

At 11:19 AM +0200 5/14/09, Sebastian Walter wrote:
>On Wed, May 13, 2009 at 10:18 PM, David J Strozzi <strozzi2@llnl.gov> wrote:
>>  Hi,
>>  [You may want to edit the numpy homepage numpy.scipy.org to tell
>>  people they must subscribe to post, and adding a link to
>>  http:// www. scipy.org/Mailing_Lists]
>>  Many of you probably know of the interpreter yorick by Dave Munro. As
>>  a Livermoron, I use it all the time.
>Never heard of it... what does it do? By the sound of it, yorick is an
>interpreted language like Python.
>>  There are some built-in
>>  functions there, analogous to but above and beyond numpy's sum() and
>>  diff(), which are quite useful for common operations on gridded data.
>>  Of course one can write their own, but maybe they should be cleanly
>>  canonized?
>>  For instance:
>>  x = linspace(0,10,10)
>>  y = sin(x)
>>  It is common, say when integrating y(x), to take "point-centered"
>>  data and want to zone-center it:
>>  I = sum(zcen(y)*diff(x))
>>  def zcen(x): return 0.5*(x[0:-1]+x[1:])
>>  Besides zcen, yorick has builtins for "point centering", "un-zone
>>  centering," etc.  Also, due to its slick syntax you can give these
>>  things as array "indexes":
>>  x(zcen), y(dif), z(:,sum,:)
>>  Just some thoughts,
>>  David Strozzi
>>  _______________________________________________
>>  Numpy-discussion mailing list
>>  Numpy-discussion@scipy.org
>>  http:// mail.scipy.org/mailman/listinfo/numpy-discussion
>Numpy-discussion mailing list
>http:// mail.scipy.org/mailman/listinfo/numpy-discussion

More information about the Numpy-discussion mailing list