Ticket #6036: 12159.patch

File 12159.patch, 654 bytes (added by klee, 12 years ago)
  • sage/rings/polynomial/multi_polynomial.pyx

    # HG changeset patch
    # User Kwankyu Lee <ekwankyu@gmail.com>
    # Date 1242280187 -32400
    # Node ID 1e1a3d3f43900d8b41c5786ad450cfb8f624c3ba
    # Parent  268d1efbf60f6c24ad9c49cb9c91ff0437e42340
    a bug fix for remove_from_tuple()
    
    diff -r 268d1efbf60f -r 1e1a3d3f4390 sage/rings/polynomial/multi_polynomial.pyx
    a b  
    961961cdef remove_from_tuple(e, int ind):
    962962    w = list(e)
    963963    del w[ind]
    964     return tuple(w)
     964    if len(w) == 1:
     965        return w[0]
     966    else:
     967        return tuple(w)
    965968