Allow uint32 dtype for coords
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 668
- Forks
- 141
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 4
Description
Hey awesome library! I'm really having a blast with it.
One question / comment:
For my purposes, I need the COO array with the largest dtype for coords of uint32.
When I create an array, the COO constructor seems to convert all coord arrays to intp or int64 in my case.
https://github.com/pydata/sparse/blob/master/sparse/coo/core.py#L234
Any thoughts on skipping that astype if coords is already an array?
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 in sparse/coo/core.py at the COO constructor around line 234, where coordinate arrays are converted to intp or int64. Check how an existing uint32 coordinate array is handled and verify that its dtype is preserved without changing behavior for other coordinate inputs. Done means COO accepts uint32 coords without the unwanted conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100