Skip to content

Add flags_array and time_array to Tree class? #1322

@jeromekelleher

Description

@jeromekelleher

#1320 added arrays for the underlying tree vectors. I think it's probably a good idea to add the flags_array and time_array to the Tree class also, since these are things we'll often be using in low-level algorithms, and it's a faff (and currently copy-ful, semantics-wise) to do this via the tree sequence tables arrays.

On a technical node, I think we'd probably need to do this from the bottom up like the Tree arrays, using the Tree class as the base object for the numpy arrays. We could just create arrays in the high-level Tree class, but these would be copies and so technically incur a perf penalty (even if it would probably be negligible).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python APIIssue is about the Python API

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions