tskit-dev / pyslim

Tools for dealing with tree sequences coming to and from SLiM.
MIT License
27 stars 23 forks source link

use `table.metadata_vector( )` in docs #209

Open petrelharp opened 2 years ago

petrelharp commented 2 years ago

.. when approppriate, for instance changing

max_age = max([ind.metadata["age"] for ind in ts.individuals()])

to

max_age = max(ts.tables.individuals.metadata_vector("age"))

However, let's wait until immutable tables happen, else this will be less efficient, not more efficient due to copying of tables.