[Feat] [pydeck] Convert numpy arrays to lists during JSON serialization
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Target Use Case
I've passed numpy arrays to pydeck many times, often in the context of a PathLayer, and run into the object has no vars error. After recalling what this means, I go figure out where the issue is and make sure everything ends up as lists. This would shortcut that issue, and help others not get lost trying to decode the error message.
Proposal
Just a couple of lines and a numpy import:
https://github.com/dakoop/deck.gl/commit/f8dd1ef4aaab09bdb9e39b619b42c4210426ae5e
Contributor guide
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 with pydeck's JSON serialization path and inspect the linked commit for the proposed implementation. Verify how numpy arrays currently trigger the object-has-no-vars error, then confirm that serialization converts them to lists and that the reported PathLayer use case works without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100