ENH: Add infrastructure to simplify unicode/StringDType promoters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 32.8k
- Forks
- 12.8k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 197
Description
Originally from a comment by @seberg: https://github.com/numpy/numpy/pull/27636#pullrequestreview-2404871051
The one story that I could potentially see is to make something like an abstract (doesn't need to be an actual thing could just be a tuple as in isinstance, but conceptually):
class StringOrUnicodeDType:
so that we could just add one promoter, but the promoter would be need to programmatically decide whether the result should be unicode or string. (Similar to the "this dtype must occur", style of logic. But these ufuncs that include ints show that just a list of dtypes is not super helpful a such)
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
No files or tests are named. Start by locating the existing unicode/StringDType promoters and the ufunc promotion logic, including cases involving integers. Done means establishing infrastructure for a single promoter to choose between string and unicode results, with coverage for the relevant cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100