Skip to main content
Ctrl+K
scikit-bio 0.7.5-dev documentation scikit-bio 0.7.5-dev documentation
  • Install
  • Learn
  • Documentation
  • Contribute
  • Community
  • Releases
  • About
    • Input and Output (skbio.io)
    • Biological Sequences (skbio.sequence)
    • Sequence Alignments (skbio.alignment)
    • Trees and Phylogenetics (skbio.tree)
    • Community Diversity (skbio.diversity)
    • Multivariate Statistics (skbio.stats)
    • Biological Embeddings (skbio.embedding)
    • Data Table (skbio.table)
    • Metadata (skbio.metadata)
    • Workflow Construction (skbio.workflow)
    • Utilities for Developers (skbio.util)
    • Configuration Options
    • Computation and Performance
  • GitHub
  • Twitter
  • Install
  • Learn
  • Documentation
  • Contribute
  • Community
  • Releases
  • About
  • Input and Output (skbio.io)
  • Biological Sequences (skbio.sequence)
  • Sequence Alignments (skbio.alignment)
  • Trees and Phylogenetics (skbio.tree)
  • Community Diversity (skbio.diversity)
  • Multivariate Statistics (skbio.stats)
  • Biological Embeddings (skbio.embedding)
  • Data Table (skbio.table)
  • Metadata (skbio.metadata)
  • Workflow Construction (skbio.workflow)
  • Utilities for Developers (skbio.util)
  • Configuration Options
  • Computation and Performance
  • GitHub
  • Twitter

Section Navigation

  • skbio.tree.TreeNode
  • skbio.tree.upgma
  • skbio.tree.nj
  • skbio.tree.gme
  • skbio.tree.bme
  • skbio.tree.nni
  • skbio.tree.rf_dists
  • skbio.tree.wrf_dists
  • skbio.tree.path_dists
  • skbio.tree.majority_rule
  • skbio.tree.BPTree
    • skbio.tree.BPTree.read
    • skbio.tree.BPTree.write
    • skbio.tree.BPTree.to_npz
    • skbio.tree.BPTree.from_npz
    • skbio.tree.BPTree.root
    • skbio.tree.BPTree.parent
    • skbio.tree.BPTree.first_child
    • skbio.tree.BPTree.last_child
    • skbio.tree.BPTree.next_sibling
    • skbio.tree.BPTree.previous_sibling
    • skbio.tree.BPTree.lca
    • skbio.tree.BPTree.is_ancestor
    • skbio.tree.BPTree.deepest_node
    • skbio.tree.BPTree.preorder_rank
    • skbio.tree.BPTree.postorder_rank
    • skbio.tree.BPTree.preorder_select
    • skbio.tree.BPTree.postorder_select
    • skbio.tree.BPTree.level_ancestor
    • skbio.tree.BPTree.level_next
    • skbio.tree.BPTree.is_tip
    • skbio.tree.BPTree.depth
    • skbio.tree.BPTree.height
    • skbio.tree.BPTree.count
    • skbio.tree.BPTree.close_batch
    • skbio.tree.BPTree.parent_batch
    • skbio.tree.BPTree.lca_batch
    • skbio.tree.BPTree.level_ancestor_batch
    • skbio.tree.BPTree.cophenet
    • skbio.tree.BPTree.tip_positions
    • skbio.tree.BPTree.positions
    • skbio.tree.BPTree.name
    • skbio.tree.BPTree.numba_arrays
    • skbio.tree.BPTree.shear
    • skbio.tree.BPTree.collapse
    • skbio.tree.BPTree.from_treenode
    • skbio.tree.BPTree.to_array
    • skbio.tree.BPTree.to_device
  • Numba kernels over a BPTree (skbio.tree.bp.numba)
  • Trees and Phylogenetics (skbio.tree)
  • skbio.tree.BPTree
  • skbio.tree.BPTree.to_array

skbio.tree.BPTree.to_array#

BPTree.to_array()[source]#

Return an array representation of the tree.

This mirrors skbio.tree.TreeNode.to_array.

Returns:
dict

Dictionary with keys 'child_index', 'length', 'id_index' and 'name'.

See also

skbio.tree.TreeNode.to_array

previous

skbio.tree.BPTree.from_treenode

next

skbio.tree.BPTree.to_device

On this page
  • BPTree.to_array

© Copyright 2014-2026, scikit-bio development team.

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.23.0.