#17558: pickled function loses its args
------------------------+----------------------------
Reporter: wonder | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: pickling | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+----------------------------
The pickle process appears to forget whether an expression is a function.
{{{
sage: var('u_0 u_1')
(u_0, u_1)
sage: f2u = (1 - u_0).function(u_0, u_1)
sage: f2u(x,y)
-x + 1
sage: f2 = loads(dumps(f2u))
sage: f2(x,y)
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/usr/local/src/jekyll-
research/wmd_files/Selection_Gradients/maclev-2-2-adap.sage.py in
<module>()
----> 1 f2(x,y)
/usr/local/sage/local/lib/python2.7/site-
packages/sage/symbolic/expression.so in
sage.symbolic.expression.Expression.__call__
(build/cythonized/sage/symbolic/expression.cpp:24669)()
/usr/local/sage/local/lib/python2.7/site-packages/sage/symbolic/ring.so in
sage.symbolic.ring.SymbolicRing._call_element_
(build/cythonized/sage/symbolic/ring.cpp:8970)()
ValueError: the number of arguments must be less than or equal to 1
sage: f2u
(u_0, u_1) |--> -u_0 + 1
sage: f2
-u_0 + 1
}}}
Since I'm using a modular program design with intermediate results in
.sobj files, this (along with some other bugs I've reported) is making it
inconvenient for me to work with functions...
--
Ticket URL: <http://trac.sagemath.org/ticket/17558>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.