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

replace numpy usage with custom types using buffer protocol #199

Closed
maxbachmann opened this issue Mar 4, 2022 · 0 comments
Closed

replace numpy usage with custom types using buffer protocol #199

maxbachmann opened this issue Mar 4, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@maxbachmann
Copy link
Member

The library should not directly use numpy for the following reasons:

  • numpy wheels are not available for many platforms, which makes compiling for these platforms a very slow process
  • the numpy dependency is very large, which makes it harder to use the library in some contexts

This can be solved by writing custom containers which follow the buffer protocol. Those would be easy to convert to numpy arrays when needed without requiring numpy as dependency. This should be done for all new APIs: #188. For the existing cdist API this change would need to wait until version 3.0.0, since it is a breaking change. Alternatively cdist could be deprecated, since everything that can be done with it can be done with the new Compare API as well.

@maxbachmann maxbachmann added the enhancement New feature or request label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant