def _from_dict_to_object(cls, data_dict): forms_dct, wt, prec, base_ring = \ [data_dict[ky] for ky in ["forms", "wt", "prec", "base_ring"]] prec = PrecisionDeg2._from_dict_to_object(prec) forms = [QexpLevel1._from_dict_to_object(d) for d in forms_dct] return cls(forms, wt, prec, base_ring)
def _from_dict_to_object(cls, data_dict): if "mp" in data_dict.keys(): kys = ["mp", "prec", "base_ring", "is_cuspidal"] else: kys = ["fc_dct", "prec", "base_ring", "is_cuspidal"] fc_dct, prec, base_ring, is_cuspidal = [data_dict[ky] for ky in kys] prec = PrecisionDeg2._from_dict_to_object(prec) return cls(fc_dct, prec, base_ring=base_ring, is_cuspidal=is_cuspidal)
def load_basis_from(self, filename): dicts = load(filename) prec = dicts[0]["prec"] if self.prec > PrecisionDeg2._from_dict_to_object(prec): msg = "self.prec must be less than {prec}".format(prec=prec) raise RuntimeError(msg) basis = [ModFormQexpLevel1._from_dict_to_object(dct) for dct in dicts] self.__basis_cached = True self.__cached_basis = basis
def _from_dict_to_object(cls, data_dict): if "mp" in data_dict.keys(): kys = ["wt", "mp", "prec", "base_ring", "construction", "is_cuspidal"] else: kys = ["wt", "fc_dct", "prec", "base_ring", "construction", "is_cuspidal"] wt, fc_dct, prec, base_ring, const, is_cuspidal \ = [data_dict[ky] for ky in kys] prec = PrecisionDeg2._from_dict_to_object(prec) f = ModFormQexpLevel1(wt, fc_dct, prec, base_ring=base_ring, is_cuspidal=is_cuspidal) f._construction = const return f