Skip to content

pickle Lambdify only works with backend='llvm' and not with backend='lambda #294

Open
@raphaelquast

Description

@raphaelquast

I've just noticed that pickling of symengine Lambdify functions fails with the default 'lambda' backend, but works fine with the 'llvm' backend...
is there any particular reason for that? (or in other words... will I run into problems when I use the 'llvm' backend?)

maybe the fixes of #213 need to be repeated?

import symengine as seng
import pickle
x, y = seng.var("x, y")
f1 = seng.Lambdify([x, y], x+y, backend='llvm')
f2 = seng.Lambdify([x, y], x+y, backend='lambda')

_ = pickle.dumps(f1)
>>> works perfect

_ = pickle.dumps(f2)
>>>TypeError: self.lambda_double,self.lambda_double_complex cannot be converted to a Python object for pickling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions