|
33 | 33 | - Add ``TreeSequence.mutations_inherited_state`` which returns the inherited state
|
34 | 34 | for each mutation. (:user:`benjeffery`, :pr:`3276`, :issue:`2631`)
|
35 | 35 |
|
| 36 | +- Add ``TreeSequence.sites_ancestral_state`` and ``TreeSequence.mutations_derived_state`` properties |
| 37 | + to return the ancestral state of sites and derived state of mutations as NumPy arrays of |
| 38 | + the new numpy 2.0 StringDType. |
| 39 | + (:user:`benjeffery`, :pr:`3228`, :issue:`2632`) |
| 40 | + |
| 41 | +- Tskit now distributes with a requirement of numpy version 2 or greater. However, you can still use |
| 42 | + tskit with numpy 1.X by building tskit from source with numpy 1.X using ``pip install tskit --no-binary tskit``. |
| 43 | + With numpy 1.X, any use of the new StringDType properties will result in a ``RuntimeError``. |
| 44 | + If you try to use another python module that was compiled against numpy 1.X with numpy 2.X you may see |
| 45 | + the error "A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash.". |
| 46 | + If no newer version of the module is available you will have to use the Numpy 1.X build as above. |
| 47 | + |
36 | 48 | **Bugfixes**
|
37 | 49 |
|
38 | 50 | - In some tables with mutations out-of-order `TableCollection.sort` did not re-order
|
|
65 | 77 | - ``ltrim``, ``rtrim``, ``trim`` and ``shift`` raise an error if used on a tree sequence
|
66 | 78 | containing a reference sequence (:user:`hyanwong`, :pr:`3210`, :issue:`2091`)
|
67 | 79 |
|
68 |
| -- Add ``TreeSequence.sites_ancestral_state`` and ``TreeSequence.mutations_derived_state`` properties |
69 |
| - to return the ancestral state of sites and derived state of mutations as NumPy arrays of |
70 |
| - the new numpy 2.0 StringDType. |
71 |
| - This requires numpy version 2 or greater, as such this is now the minimum version stated in tskit's |
72 |
| - dependencies. If you try to use another python module that was compiled against numpy 1.X you may see |
73 |
| - the error "A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash.". |
74 |
| - If no newer version of the module is avaliable you can still use it with tskit and numpy 1.X by |
75 |
| - building tskit from source with numpy 1.X using ``pip install tskit --no-binary tskit``. However |
76 |
| - any use of the new properties will result in a ``RuntimeError``. |
77 |
| - (:user:`benjeffery`, :pr:`3228`, :issue:`2632`) |
78 |
| - |
79 | 80 | --------------------
|
80 | 81 | [0.6.4] - 2025-05-21
|
81 | 82 | --------------------
|
|
0 commit comments