@@ -2438,18 +2438,6 @@ def nodes(self, root=None, order="preorder"):
24382438 root = - 1 if root is None else root
24392439 return iterator (root )
24402440
2441- def _node_edges (self ):
2442- """
2443- Return a numpy array mapping the node IDs in this tree to the ID of the edge
2444- above them. This is in lieu of a tree.edge(u) function, currently implemented
2445- using the non-optimised Python TreeSequence._tree_node_edges() generator
2446- """
2447- for index , node_edge_map in enumerate ( # pragma: no branch
2448- self .tree_sequence ._tree_node_edges ()
2449- ):
2450- if index == self .index :
2451- return node_edge_map
2452-
24532441 def _as_newick_fast (self , * , root , precision , legacy_ms_labels ):
24542442 """
24552443 Call into the fast but limited C implementation of the newick conversion.
@@ -5394,20 +5382,6 @@ def edge(self, id_):
53945382 metadata_decoder = self .table_metadata_schemas .edge .decode_row ,
53955383 )
53965384
5397- def _tree_node_edges (self ):
5398- """
5399- Return a generator over the trees in the tree sequence, yielding a numpy array
5400- that maps the node IDs in the tree to the ID of the edge above them.
5401- Currently this is a private, non-optimised Python implementation.
5402- """
5403- node_edges = np .full (self .num_nodes , NULL , dtype = np .int32 )
5404- for _ , edges_out , edges_in in self .edge_diffs ():
5405- for e in edges_out :
5406- node_edges [e .child ] = NULL
5407- for e in edges_in :
5408- node_edges [e .child ] = e .id
5409- yield node_edges
5410-
54115385 def migration (self , id_ ):
54125386 """
54135387 Returns the :ref:`migration <sec_migration_table_definition>` in this tree
0 commit comments