Skip to content

numpy 2 breaks the int-encoding representation of the BP tree #562

Open
@fedarko

Description

@fedarko

As documented in #561.

As far as I can tell, there are two possible solutions:

  1. Pin numpy < 2
  2. Update empress.tools.shifting() to convert all bits in the input bitlist to int objects, rather than np.uint8 objects

For the time being, the first option is easier. But I imagine QIIME 2 will eventually move to using numpy 2, which will mean we'll have to go with the second option. (For reference: the latest release of Q2, 2024.5, uses numpy=1.26.4 -- which is literally the latest numpy version before the 2.x versions.)

Option 2 isn't really that bad -- I think just adding bitlist = [int(x) for x in bitlist] to line 3 of shifting() would fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions