Ticket #9579: trac_9579_review.patch

File trac_9579_review.patch, 837 bytes (added by schilly, 11 years ago)

test both arguments, not only one of them

  • sage/numerical/mip.pyx

    # HG changeset patch
    # User Harald Schilly <harald.schilly@gmail.com>
    # Date 1279875545 25200
    # Node ID 9ab675652c192272d1a85a6c5a5f8121ec5c0ed7
    # Parent  e998606ac9d10d6c2f9c39d654824e3fc8ada044
    9579 reviewer patch
    
    diff -r e998606ac9d1 -r 9ab675652c19 sage/numerical/mip.pyx
    a b  
    735735            Traceback (most recent call last):
    736736            ...
    737737            ValueError: min and max arguments are required to be numerical
     738            sage: p.add_constraint(v[3] + v[5], max = v[6])
     739            Traceback (most recent call last):
     740            ...
     741            ValueError: min and max arguments are required to be numerical
    738742
    739743        """
    740744        if linear_function is None or linear_function is 0: