[sage-support] Coefficients in Modular Symbol Spaces

2011-06-28 Thread Jay
This is perhaps a naive question, but I couldn't find it anywhere. Suppose I have an element of a modular symbol space, which Sage is able to output as a linear combination of Manin symbols. Is there a way to get Sage to give me back an individual coefficient of a particular basis element in that

[sage-support] Re: Integrating python functions

2011-06-28 Thread kcrisman
On Jun 27, 3:22 pm, Michael Orlitzky wrote: > I'll take a simple example. I'd like to integrate (or differentiate, or > whatever) the following function, > >   x = var('x') > >   a = x >   b = 2*x Here you probably mean something else. Are you getting a deprecation warning? It's better to de

Re: [sage-support] Re: Integrating python functions

2011-06-28 Thread Michael Orlitzky
On 06/28/11 09:12, kcrisman wrote: > > Here you probably mean something else. Are you getting a deprecation > warning? > > It's better to define > > a(x) = x > b(x) = 2*x > I know this for the Sage prompt, but it doesn't work in a Python file because without the preprocessing it tries to eval

[sage-support] Re: Integrating python functions

2011-06-28 Thread Jason Grout
On 6/28/11 9:47 AM, Michael Orlitzky wrote: On 06/28/11 09:12, kcrisman wrote: Here you probably mean something else. Are you getting a deprecation warning? It's better to define a(x) = x b(x) = 2*x I know this for the Sage prompt, but it doesn't work in a Python file because without the

[sage-support] Re: Integrating python functions

2011-06-28 Thread Nils Bruin
On Jun 28, 7:57 am, Jason Grout wrote: > sage: preparse('a(x)=2*x') > '__tmp__=var("x"); a = symbolic_expression(Integer(2)*x).function(x)' And, as we know now, if we do this in the notebook, we can even change the value of 2 afterwards: def f(x): return 2*x print f(3) _sage_const_2=3 print f

[sage-support] Re: Integrating python functions

2011-06-28 Thread Simon King
Hi! On 28 Jun., 16:47, Michael Orlitzky wrote: > > @symbolicfunction > > def f(x): > >    return some_expression_in_x(x) > > > Others have ideas whether this is good/feasible? > > I'll vote for good, and have no idea re: feasibility. Certainly it is a good idea. Concerning feasibility: I am not

[sage-support] Re: Integrating python functions

2011-06-28 Thread Simon King
Hi! The most straight forward way does not work: sage: def bla(x): : print "here I am" : return x**2 : sage: foo = function("foo", nargs=1, eval_func = bla) sage: foo(5) --- TypeError

[sage-support] which part of sage do I need to cite?

2011-06-28 Thread zsharon
Hi all, I'm trying to properly attribute sage in my master's thesis, and I need to know what components (pari, etc) or which authors I need to cite given that I used the following: 1. I used E=EllipticCurve([-2,5]) E.gens() for one explicit calculation. 2. I used (where f is a polynomial) L.

[sage-support] Re: which part of sage do I need to cite?

2011-06-28 Thread kcrisman
Here is an example. sage: from sage.misc.citation import get_systems sage: get_systems('E = EllipticCurve([-2,5])') ['Singular', 'ginac'] sage: E = EllipticCurve([-2,5]) sage: get_systems('E.gens()') ['PARI', 'mwrank', 'Singular', 'FLINT', 'MPFR', 'ginac'] Note that I have to actually do the comm