emilydolson / phylotrackpy

Python phylogeny tracker for in silico evolution experiments
MIT License
9 stars 2 forks source link

`colless_like_index` crashes for empty tree #83

Open mmore500 opened 3 months ago

mmore500 commented 3 months ago

Describe the bug Calculation of colless-like index crashes on empty trees

To Reproduce Steps to reproduce the behavior:

>>> from phylotrackpy import systematics
>>> syst = systematics.Systematics(lambda x: x)
>>> syst.colless_like_index()

Expected behavior Shouldn't crash. Should give numerical result (perhaps NaN).

Computational environment (please complete the following information):

Additional context v0.2.0