CoCalc Shared Filescode / fast-modsym-worksheet.sagewsOpen in CoCalc with one click!
Authors: JB Nam, James Rickards, William A. Stein, Andrew Sutherland, Nicholas Triantafillou, Jan Vonk

Example of loading fast modular symbols code in a Jupyter notebook.

A = ModularSymbols(389,sign=1).cuspidal_subspace().new_subspace().decomposition()[0] f = ModularSymbolMap(A)
%timeit f._eval1(-3,7)
625 loops, best of 3: 715 ns per loop
E = EllipticCurve('37a1') psi = ModularSymbolMap(E.modular_symbol()) m = 1000000 stats.TimeSeries([psi._eval1(a,m)[0] for a in range(m)]).plot_histogram()