-
Notifications
You must be signed in to change notification settings - Fork 17
Python support #133
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
base: main
Are you sure you want to change the base?
Python support #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, definitely seems doable. Concerned about the thread safety aspect, not sure if that would preclude us from adding the bindings we actually end up using here or not given our setup with dask (since we might need special handling for thread/process safety).
|
|
||
| #[pymethods] | ||
| impl PyWriter { | ||
| fn add_item(&mut self, item: ItemId, vector: PyReadonlyArray1<f32>) -> PyResult<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I image we would want some sort of iterator over a 2D datastructure (for loops in python to go one-by-one strike me as slower than doing it here).
Separately, I am curious about the data type limitation: https://docs.rs/arroy/latest/arroy/struct.Writer.html#method.add_item I hadn't noticed that that vector has to be fixed at f32
Pull Request
Related issue
Fixes #131
What does this PR do?
Adds
TODO
PR checklist
Please check if your PR fulfills the following requirements: