← Back to team overview

ufl team mailing list archive

Strange bug

 

I've implemented is_multilinear and it seems to work fine, but there
is a mysterious bug. Try running multilinear.py in the sandbox. The
first two forms are not multilinear, but the third one is.

If I iterate over the tree like this, it works:

    for (o, stack) in traversal(e, []):

But if I do like this, it does not:

    for (o, stack) in traversal(e):

The default argument for stack is [] so it shouldn't be any
difference, but without adding [], is_multilinear reports that the
third from (c) is not multilinear because of a division by a basis
function which appears in (b). So for some reason, an operator from
the previous form remains in the stack.

Any ideas?

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups