Ticket #4340: trac-4340-pt2.patch

File trac-4340-pt2.patch, 716 bytes (added by Craig Citro, 14 years ago)
  • sage/modular/modform/vm_basis.py

    # HG changeset patch
    # User Craig Citro <craigcitro@gmail.com>
    # Date 1225423122 25200
    # Node ID cb41a9be47f6609ab27c65389e15c1e0e29efda4
    # Parent  bf5e0a63f8fa631da5a13a184c926abc09792614
    Additional fix for trac #4340.
    
    diff -r bf5e0a63f8fa -r cb41a9be47f6 sage/modular/modform/vm_basis.py
    a b  
    103103    e = k.mod(12)
    104104    if e == 2: e += 12
    105105    n = (k-e) // 12
     106
     107    if n == 0 and cusp_only:
     108        return Sequence([])
    106109
    107110    # If prec is less than or equal to the dimension of the space of
    108111    # cusp forms, which is just n, then we know the answer, and we