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

[Question] Why require numpy version stick to 1.25? #544

Open
KuribohG opened this issue Apr 25, 2024 · 2 comments
Open

[Question] Why require numpy version stick to 1.25? #544

KuribohG opened this issue Apr 25, 2024 · 2 comments
Labels
question Further information is requested

Comments

@KuribohG
Copy link

I want to build diskannpy for py3.8, however I found this PR: #396.
Why diskannpy relies on exactly version 1.25 of numpy? I didn't find further explanation in this repo.
Seems this PR is related to subnormal float computation. Did numpy 1.25 has some special features or bug fixes for subnormal floats?

@KuribohG KuribohG added the question Further information is requested label Apr 25, 2024
@daxpryce
Copy link
Contributor

daxpryce commented May 9, 2024

@KuribohG sorry I'm so late in getting back to you, I just now saw this issue.

There is no reason that you need to stick with numpy 1.25. The problem is that the version that is compiled is compiled against the headers in numpy - and when I published to pypi I could pick precisely one version to do that for.

For further flexibility in this regard, we would need to create a conda recipe to build this. I didn't have time to do this myself, though I'd be eager for a PR in this regard if anyone could make it.

If you want to build against a different version of numpy, you are more than welcome to! To do this, follow these steps (note they are probably rough as they are from my flawed memory, but it might be enough to get you started)

1: Install all the project's prerequisites for your system. The instructions are in the README.md in the root of the repo. If you're building for ubuntu, there's a helper script in scripts/dev/install-dev-deps-ubuntu.bash that will do it all at once.
2: Edit pyproject.toml and change the version to 1.26, 1.24, 1.23 etc.
3: create a virtual environment python3.11 -m venv venv and activate it source venv/bin/activate
4: pip install build
5: python -m build

This should create a wheel that will work with your chosen version of numpy.

Note that this is ultimately what a conda recipe would do.

@daxpryce
Copy link
Contributor

daxpryce commented May 9, 2024

Also note: you can use whatever python version you'd like, >= 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants