On 2007-05-03, sturlamolden <[EMAIL PROTECTED]> wrote:
> On May 3, 6:22 am, Charles Sanders <[EMAIL PROTECTED]>
> wrote:
>
>>         y = a*b+c*d   # Returns a proxy object
>>
>>         x = y[4]      # Computes x = a[4]*b[4] + c[4]*d[4]
>>
>>         v = y.eval()  # Evaluates all elements, returning Xarray
>>
>>         z = ((a+b)*(c+d)).eval()  # Also evaluates all elements
>
> When I suggested this on the NumPy mailing list, I too suggested using
> the indexing operator to trigger the computations. But I am worried
> that if an expression like
>
> y = a*b+c*d
>
> returns a proxy, it is somehow possible to mess things up by creating
> cyclically dependent proxies. I may be wrong about this, in which case
> __getitem__ et al. will do the job.

How do you expect to handle the following kind of situation:

  while <condition>:
    x = y
    a = ...
    b = ...
    y = a * x + b 

-- 
Antoon Pardon
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to