[Numpy-discussion] Fwd: GPU Numpy

Francesc Alted faltet@pytables....
Thu Sep 10 07:21:08 CDT 2009


A Thursday 10 September 2009 11:40:48 Sturla Molden escrigué:
> Francesc Alted skrev:
> > Numexpr already uses the Python parser, instead of build a new one.
> > However the bytecode emitted after the compilation process is
> > different, of course.
> >
> > Also, I don't see the point in requiring immutable buffers. Could you
> > develop this further?
>
> If you do lacy evaluation, a function like this could fail without
> immutable buffers:
>
> def foobar(x):
>     y = a*x[:] + b
>     x[0] = 0 # affects y and anything else depending on x
>     return y
>
> Immutable buffers are not required, one could document the oddity, but
> coding would be very error-prone.
>

Mmh, I don't see a problem here if operation's order is kept untouched (and 
you normally want to do this).  But I'm not an expert on 'lazy evaluation', so 
may want to ignore my comments better ;-)

-- 
Francesc Alted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090910/98cefeda/attachment.html 


More information about the NumPy-Discussion mailing list