Open 51b33c04-92b8-44c2-9e6f-69d65854572a opened 12 years ago
Description changed:
---
+++
@@ -41,7 +41,7 @@
sage: vx = v(y=0)
-Now, if every entry still has a variable everything, including positional rather than named arguments work. +Now, if every entry still has a variable everything, including positional rather than named arguments, works.
sage: v(x, y) = [x+y, x-y]
Description changed:
---
+++
@@ -18,7 +18,7 @@
TypeError
-This is because all evaluation, even if partial, of a callable vector function returns a Vector_symbolic_dense.
+This is because all evaluation, even if partial, of a callable vector function returns a Vector_symbolic_dense. The relevant function _ _call_
_() is defined in free_module_element.pyx.
The fix, of course, is to make the code intelligent enough to know that an evaluation is only partial -- one hopes that type(vx)
would return 'sage.modules.vector_callable_symbolic_dense.Vector_callable_symbolic_dense'> rather than 'sage.modules.vector_symbolic_dense.Vector_symbolic_dense'>
For callable (scalar) functions, taking sections (partial evaluation) of functions works perfectly fine; that is to say the following code works perfectly as expected:
Move up to callable vector functions and taking sections breaks however:
This is because all evaluation, even if partial, of a callable vector function returns a Vector_symbolic_dense. The relevant function _
_call_
_() is defined in free_module_element.pyx.The fix, of course, is to make the code intelligent enough to know that an evaluation is only partial -- one hopes that
type(vx)
would return 'sage.modules.vector_callable_symbolic_dense.Vector_callable_symbolic_dense'> rather than 'sage.modules.vector_symbolic_dense.Vector_symbolic_dense'>Work-around
This isn't so bad since we can still do:
Now, if every entry still has a variable everything, including positional rather than named arguments, works.
However, things break if taking a section kills off all variables in any component we try to use positional arguments:
CC: @jasongrout
Component: symbolics
Keywords: sd35.5
Issue created by migration from https://trac.sagemath.org/ticket/12302