MAINT: Post UFunc refactor check-list
Open
Nobody has claimed this yet.
component: numpy.dtype
component: numpy.ufunc
- Dominant language
- Python
- Stars
- 32.8k
- Forks
- 12.8k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 197
Description
A task-list of possible or necessary post UFunc refactor cleanups:
- The ufunc cache can currently grow indefinitely, in practice it probably doesn't matter, but if someone writes a hypothesis test for a SciPy ufunc with 4 inputs, the explosion of input DType combination could become problematic.
- Either needs a hard maximum cache size, or a smart caching scheme (or both).
- The PR does not address weak promotion. Making this only accessible through the legacy path, and only as the old-style "value-based" promotion at this time. It would be nice to fix this, but it is probably cleaner to do so after we attempt getting rid of value-based casting in (currently a
TODO: we need to special case scalars herecomment inufunc_object.c). (See also https://github.com/numpy/numpy/pull/19384#discussion_r675224885)
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 by reviewing the unchecked ufunc cache item and the value-based promotion TODO in ufunc_object.c. Trace the existing ufunc cache behavior and the post-refactor context referenced in the checklist. Done means resolving the cache-growth concern or documenting a justified decision, with the checklist updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100