[Numpy-discussion] Fwd: GPU Numpy

Sturla Molden sturla at molden.no
Thu Sep 10 05:40:48 EDT 2009


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.


S.M.





More information about the NumPy-Discussion mailing list