biocore / empress

A fast and scalable phylogenetic tree viewer for microbiome data analysis
BSD 3-Clause "New" or "Revised" License
48 stars 31 forks source link

Fix BP tree corruption due to numpy uints #563

Open fedarko opened 3 months ago

fedarko commented 3 months ago

Closes #562 (which was the cause of the problem discussed in #561).

Strangely enough, I can't seem to get Empress' Python code running within a conda environment that has numpy 2 installed -- I get a weird error from bp/_bp.pyx saying that ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject. But presumably it is possible to get numpy 2 and empress working together, because that was the set of circumstances that led to #561.

Anyway, all this to say that this PR should fix #562 and make Empress compatible with numpy 2. I can't guarantee that, since I haven't been able to get iow + numpy 2 to play nicely together on my system ... but I imagine we'll eventually need to support numpy 2 anyway, so we may as well address this now.

Edit: the build is broken for other reasons (the main build is broken due to -- it looks like -- Q2 2020.6 not being installable any more, due to seaborn version jank?; and the standalone python 3.7 build is broken due to an old version of skbio). I guess fixing the build will be another PR ...