Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fedarko opened this issue Aug 3, 2024 · 0 comments · May be fixed by #563
Open

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

fedarko opened this issue Aug 3, 2024 · 0 comments · May be fixed by #563

Comments

@fedarko
Copy link
Collaborator

fedarko commented Aug 3, 2024

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.

fedarko added a commit to fedarko/empress that referenced this issue Aug 3, 2024
Ideally we would test this on numpy v2, but I can't seem to get empress
running with numpy v2 on my system (get a cython error from iow).

in any case this should address the problem
@fedarko fedarko linked a pull request Aug 3, 2024 that will close this issue
fedarko added a commit to fedarko/empress that referenced this issue Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant