It seems that SymEngine expressions can't be deserialized if they are included in complex types (arrays, structures, etc.).
To reproduce the problem, the following code should be executed:
using SymEngine, Serialization
@vars x y
expr = x + y
open("test.bin", "w") do f
serialize(f, [expr, "Hello world"])
end
open("test.bin", "r") do f
expr2 = deserialize(f)
print(expr2)
end
Expected result: message containing x + y and Hello world. Actual result: EOFError: read end of file.
Interestingly, ["Hello world", expr] serializes as expected.
Hi!
It seems that SymEngine expressions can't be deserialized if they are included in complex types (arrays, structures, etc.).
To reproduce the problem, the following code should be executed:
Expected result: message containing
x + y
andHello world
. Actual result:EOFError: read end of file
.Interestingly,
["Hello world", expr]
serializes as expected.