Allow DenseVector construction from NumPy arrays and tensors
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 45
- Forks
- 6
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 4
Description
Users commonly work with vectors as NumPy arrays or tensors (e.g. from PyTorch, TensorFlow)
Currently, the Python client only accepts lists or tuples for DenseVector
Allow DenseVector to accept other common data types like numpy.ndarray, torch.Tensor, etc. (Other suggestions welcome)
Example: DenseVector(np_array)
Important
Validate shape - ensure 1D vectors
Ensure values are floats
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Python client's DenseVector entry point and inspect how it currently accepts lists and tuples. Verify support for NumPy arrays and tensors, with one-dimensional shape validation and float values; done means the example construction works and invalid shapes are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python, pytorch, tensorflow
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100