Patch release focused on pandas 3 and Python 3.12/3.13 compatibility, plus a switch to
numpy.random.Generator.
Fixes
- pandas 3 Copy-on-Write compatibility. Under pandas 3 (mandatory Copy-on-Write),
DataFrame.valuesreturns a read-only view, so several in-place mutations raised
ValueError: assignment destination is read-only.run_palantirfailed in_differentiation_entropy
(the terminal-state identity block, now built withnp.eye(...)), andselect_branch_cellsfailed on
its NaN fill of the fate-probability array (now copied before mutation). The package now works under
both pandas 2 and pandas 3. (#180) - anndata ≥0.11 / Python 3.12–3.13 compatibility.
cluster_gene_trendspassed thedtype=keyword
toAnnData(...), which anndata ≥0.11 (the version that resolves on Python 3.12/3.13) removed, raising
TypeError: got an unexpected keyword argument 'dtype'. The array is now cast with.astype(np.float32)
before construction; behaviour is identical and compatible with all anndata versions. (#180)
Changes
- Random number generation now uses
numpy.random.Generatorin place of the legacy global
numpy.random.RandomState, and the NumPy lower bound is raised tonumpy>=1.17. Because the default
bit generator is now PCG64 rather than the Mersenne Twister, numerical outputs are expected to differ
from previous versions. If you need to reproduce results from an earlier release exactly, pin that
prior version. (#178)
Thanks
Thanks to @Angie92Usa for reporting the pandas 3 incompatibility in #180.
Full changelog: v1.4.4...v1.4.5