[Numpy-discussion] Possible example application of the array interface

Magnus Lie Hetland magnus at hetland.org
Wed Apr 6 00:30:48 EDT 2005


I was just thinking about some experimental designs, and whether I
could, perhaps, do the statistics in Python. I remembered having used
RPy [1] briefly at some time (there may be other similar bindings out
there -- I don't remember) and started thinking about whether I could,
perhaps, combine it with numpy in some way. My first thought was to
reimplement the relevant statistical functions; then I thought about
how to convert data back and forth -- but then it occurred to me that
R also uses arrays extensively, and that it could, perhaps, be
possible to expose those (through something like RPy) through the
array interface/protocol!

This would be (IMO) a good example of the benefits of the array
protocol; it's not a matter of "getting yet another array module". RPy
is an external library/language with *lots* of features that might be
useful to numpy users, many of which aren't likely to be implemented
in Python for quite a while, I'd guess (unless, perhaps, someone
writes a translator from R, which I'm sure is doable).

I don't know enough (at least yet ;) about the implementation of RPy
and the R library to say for sure whether this would even be possible,
but it does seem like it could be really useful...

[1] rpy.sf.net

-- 
Magnus Lie Hetland                    Fall seven times, stand up eight
http://hetland.org                                  [Japanese proverb]




More information about the NumPy-Discussion mailing list