Ticket #10450: trac_10450.patch

File trac_10450.patch, 1.4 KB (added by davidloeffler, 12 years ago)

patch against 4.6.1.alpha3

  • sage/modular/modform/space.py

    # HG changeset patch
    # User David Loeffler <d.loeffler.01@cantab.net>
    # Date 1291933363 0
    # Node ID 4f9d567099a55afe9242fa3efb7a1283da0659a1
    # Parent  1cb202e8a606dc2ab85489ff9df9cb4ea78c1aa1
    #10450: problem with Hecke matrices for subspaces of modular forms spaces
    
    diff -r 1cb202e8a606 -r 4f9d567099a5 sage/modular/modform/space.py
    a b  
    12641264            Traceback (most recent call last):
    12651265            ...
    12661266            ArithmeticError: vector is not in free module
     1267
     1268        We check that #10450 is fixed::
     1269
     1270            sage: CuspForms(Gamma1(22), 2).new_submodule().hecke_matrix(5)
     1271            [-4  4 -2 -2]
     1272            [-2  2 -4  0]
     1273            [-2  2 -2  0]
     1274            [ 0  2 -2 -2]
    12671275        """
    12681276        if prec is None:
    12691277            # Initial guess -- will increase if need be.
     
    12801288        B = self.q_expansion_basis(prec)
    12811289        eps = self.character()
    12821290        if eps is None:
    1283             raise NotImplementedError
     1291            # this only occurs for Gamma1 and GammaH spaces
     1292            return self.ambient_module().hecke_matrix(p).restrict(self.free_module())
    12841293        try:
    12851294            return hecke_operator_on_qexp.hecke_operator_on_basis(B, p,
    12861295                       self.weight(), eps, already_echelonized=False)