Accessing PyArray_GETITEM and PyArray_SETITEM
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Issue description
In order to pass PR #1152 on CI, I need to access PyArray_GETITEM and PyArray_SETITEM. These functions are not a part of the limited Python API Pybind11 seems to give access to. I was wondering how I could go about using them?
Initially, Jason suggested reimplementing the functions like they are in ndarraytypes.h, but then realized that the object types like PyArray_ArrFuncs is something we can't have access to. Is there a way around this? I guess, creating proxies doesn't make sense as well since the types are not exposed in Numpy's API, correct?
As per Jason's suggestion, I've asked the question on numpy-discussion as well, about why aren't these functions exposed like the rest of them in numpy_api.py.
Any help would be appreciated! Thanks!
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 PR #1152, the limited-API entries in numpy_api.py, and the PyArray_GETITEM and PyArray_SETITEM definitions in ndarraytypes.h. Determine whether NumPy exposes a supported access path for these functions; done means documenting or agreeing on a supported approach, since the issue does not define a repository change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, numpy, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100