On Dec 26, 11:16 am, Michael Orlitzky <mich...@orlitzky.com> wrote:
>   RuntimeError: unknown function 'f' in archive
>
> Anyone hit this before?

It sounds familiar to me. I think it was discussed, but I cannot find
a reference. I ran into it via

sage: f=function('f')
sage: E=f(x)
sage: loads(E.dumps())
RuntimeError: unknown function 'f' in archive

which shows that "free" functions don't get pickled properly. "free"
variable do, so basically the code just has to be adjusted so that it
does the same to functions as it does to variables. Functions live in
the "operator" field of symbolic expressions rather than the "operand"
fields, and those aren't scanned for things that need to be included
in the pickle. Good judgement is needed, however: when pickling
"sin(x)", do you need to include "sin"?

It looks like deepcopy simply serializing and deserializing the
expressions in order to ensure a fresh version is created.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to