Ticket #8616: trac_8616_symbolic_sage_correct2.patch

File trac_8616_symbolic_sage_correct2.patch, 1.1 KB (added by yuri.k, 11 years ago)

more precise autodetect of independent variable

  • sage/calculus/desolvers.py

    # HG changeset patch
    # User Yuri Karadzhov <yuri.karadzhov@gmail.com>
    # Date 1269855716 0
    # Node ID fc6377e7ba1c97832241ea3117e8d6ded62ae408
    # Parent  8f637725000793f5850716f65617f0394f20f0f6
    trac 8616: desolve correction
    
    More precise autodetection of independent variable
    
    diff -r 8f6377250007 -r fc6377e7ba1c sage/calculus/desolvers.py
    a b  
    348348        ivars = set()
    349349        for el in diff_list:
    350350            ivars = ivars.union(el[1:])
     351        ivars = ivars.intersection(ops(dvar))
    351352        if len(ivars) != 1:
    352353            raise ValueError, "Unable to determine independent variable, please specify."
    353354        ivar = ivars.pop()
     
    596597        ivars = set()
    597598        for el in diff_list:
    598599            ivars = ivars.union(el[1:])
     600        ivars = ivars.intersection(ops(dvar))
    599601        if len(ivars) != 1:
    600602            raise ValueError, "Unable to determine independent variable, please specify."
    601603        ivar = ivars.pop()