How do I save a tree #1732
-
It is incompatible with pickle.dump, and I cant convert it to a dict, even though it already seems to be in that format |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
This is resolved because I manually made a dictionary, but a pickleable object would be great for the future |
Beta Was this translation helpful? Give feedback.
-
Can you give an example of what you'd like to do with this @arjunsrivatsa? The Tree and TreeSequence classes are bound up in terms of their memory for efficiency, so Trees aren't supported as independent entities. If you can show us some code outlining why you'd like to pickle a Tree we might be able to help. |
Beta Was this translation helpful? Give feedback.
-
To summarise the conversation above - it's usually better to save the TreeSequence object rather than individuals trees, using the TreeSequence.dump method. |
Beta Was this translation helpful? Give feedback.
To summarise the conversation above - it's usually better to save the TreeSequence object rather than individuals trees, using the TreeSequence.dump method.