[Numpy-discussion] (no subject)
Thu May 14 04:19:03 CDT 2009
On Wed, May 13, 2009 at 10:18 PM, David J Strozzi <firstname.lastname@example.org> wrote:
> [You may want to edit the numpy homepage numpy.scipy.org to tell
> people they must subscribe to post, and adding a link to
> 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
> 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
More information about the Numpy-discussion