skbio.tree.BPTree.from_npz#
- classmethod BPTree.from_npz(file)[source]#
Load a tree from a NumPy
.npzarchive written byto_npz.- Parameters:
- filestr or file-like object
Path or open file handle to read from.
- Returns:
- BPTree
The reconstructed tree, with node names and branch lengths.
Warning
This method calls
numpy.loadwithallow_pickle=Truein order to restore the object-dtypenamesarray. Loading a pickled array can execute arbitrary code, so only read.npzarchives from trusted sources.