[Matrix-SIG] Numpy in Viper

skaller skaller@maxtal.com.au
Fri, 29 Oct 1999 15:11:10 +1000


Konrad Hinsen wrote:

> >       d) Should we attempt to make the two mechanisms compatible
> >
> > It is my belief that (d) would be the best option IF it is, in fact
> > possible. (c) is the next best option.
> 
> Of course (d) is ideal. And why shouldn't it be possible? 

	i don't know: I am not familiar with NumPy, I have a copy
of the specs, but have never used it. I have not attempted to implement
native arrays for Viper yet, so I just don't know.

>It shouldn't
> be difficult to implement the current NumPy functionality in terms
> of some more advanced approach.

	Ostensibly that is true, but in practice, it may
turn out to present difficulties I'm unaware of, and it may
just be a whole lot of work.

	I really don't know. I am hoping to gain some idea
before I start on the implementation. I also do not know how
far I can carry the FISh arrays through: the 'concrete
language' FISh uses is ML like, with static typing,
which is not the same as the Python concrete language.

	the sort of thing I'm hoping is that 
an expression like a + b * c / d * h(q) ^ d,
all variables being arrays, will be evaluated by
the FISh engine, C code generated, linked to dynamically,
and executed -- resulting in optimal performance.
FISh can do more, since, by using lambda calculus,
all functions are inlined, resulting in a single
expression which is evaluated as above, it is not
clear how far I can go with Python without static
typing (this depends on how successful the type
inference is).

-- 
John Skaller, mailto:skaller@maxtal.com.au
1/10 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
downloads: http://www.triode.net.au/~skaller