sage: g(x,y) = x + sin(y)
(x, y) |--> x + sin(y)
sage: g = name('g', g)
sage: g
g(x, y) == x + sin(y)
sage: g = f; f = function('f')(x) == g
sage: f.set_name('f')
I'd love constructive feedback.
I wrote some code I would like to contribute, but I don't know the most appropriate place to put it.
It works like this right now
sage: g(x,y) = x + sin(y)
(x, y) |--> x + sin(y)
sage: g = name('g', g)
sage: g
g(x, y) == x + sin(y)
I would say it is naming an expression or unnamed function to a function, but if it is actually doing something else, please let me know.
sage.symbolic.function_factory.function
function
f = x
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart() # declares the chart X on M, with coordinates (x,y)
sage: g = M.scalar_field(x+sin(y), name='g')
sage: g.display()
g: M --> R
(x, y) |--> x + sin(y)
sage: g.set_name('G')
sage: g.display()
G: M --> R
(x, y) |--> x + sin(y)
sage: g.set_name('G', latex_name=r'\mathcal{G}')
sage: g(M((1,2)))
sin(2) + 1
sage: g.differential().display()
dG = dx + cos(y) dy
sage: g.differential()[:]
[1, cos(y)]
Could you be persuaded to turn this into the beginnings of a standalone document detailing the inner workings of symbolic functions? I think that would be a great addition to the documentation.
Marcelo,Could you be persuaded to turn this into the beginnings of a standalone document detailing the inner workings of symbolic functions? I think that would be a great addition to the documentation.
I didn't realize Paul was talking about me, and for some reason missed Eric's quote.
It was probably due to me being a bit discouraged, so I wasn't thinking clearly and was mildly distancing myself from this. That is no ones fualt but my own, and seeing this gave me a chance to look back and see that people still wanted my contributution so thank you.
I'm ready now,
I recently got an account. However, I have no clue where to start, but I'll see what I can do.