def __init__(self, name, doc=None): if doc is None: doc = db.smf_families.lucky({'name': name}) if not doc: raise ValueError( 'Siegel modular form family "%s" not found in database' % (name)) self.name = name self.latex_name = doc.get('latex_name') if not self.latex_name: self.latex_name = Latex(self.name) self.plain_name = doc.get('plain_name') if not self.plain_name: self.plain_name = Latex(self.name) self.degree = doc.get('degree') self.dim_args_default = doc.get('dim_args_default') module = importlib.import_module( 'lmfdb.siegel_modular_forms.dimensions') self.__dimension = module.__dict__.get('dimension_' + name) if self.__dimension: if PY3: args = inspect.getfullargspec(self.__dimension).args self.__dimension_glossary = self.__dimension.__doc__ else: args = inspect.getargspec(self.__dimension).args self.__dimension_glossary = self.__dimension.func_doc self.__dimension_desc = {'name': name, 'args': args} else: self.__dimension_desc = None self.__dimension_glossary = None self.__samples = None self.order = doc.get('order')
def __init__(self, name): doc = smf_db_families().find_one({'name': name}) if not doc: raise ValueError( 'Siegel modular form family "%s" at not found in database' % (name)) self.name = name self.latex_name = doc.get('latex_name') if not self.latex_name: self.latex_name = Latex(self.name) self.degree = doc.get('degree') self.dim_args_default = doc.get('dim_args_default') module = importlib.import_module( 'lmfdb.siegel_modular_forms.dimensions') self.__dimension = module.__dict__.get('dimension_' + name) if self.__dimension: self.__dimension_desc = { 'name': name, 'args': inspect.getargspec(self.__dimension).args, } self.__dimension_glossary = self.__dimension.func_doc else: self.__dimension_desc = None self.__dimension_glossary = None self.__samples = None self.order = doc.get('order')
""" All imports for the Sage notebook """ import sys from sage.all import * from sagenb.notebook.all import * from sage.calculus.predefined import x from sage.misc.python import python from sage.misc.html import html, pretty_print_default, MathJax from sagenb.misc.support import help, automatic_names sage_mode = 'notebook' from sage.misc.latex import Latex latex = Latex(density=130) latex_debug = Latex(debug=True, density=130) slide = Latex(slide=True, density=256) slide_debug = Latex(slide=True, debug=True, density=256) pdflatex = Latex(density=130, pdflatex=True) pdflatex_debug = Latex(density=130, pdflatex=True, debug=True) # Set user globals to notebook worksheet globals from sage.repl.user_globals import set_globals set_globals(sys._getframe(1).f_globals) sage.misc.session.init()