buffer protocol, format_descriptor for long long missing?
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
buffer = np.array([1,2,3], dtype='int64')
this buffer array is diagnosed by the following code as having format == "l", but the format_descriptor<long long>::format() == q, what's wrong with my implementation then?
// inside pybind c++ function
auto info = buffer.request();
if (info.format != py::format_descriptor<long long>::format()) {
std::cerr << "buffer format is not correct, do nothing, "
<< info.format << " vs " << py::format_descriptor<long long>::format();
}
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 reproducing the reported comparison in the shown pybind C++ function using a NumPy int64 buffer, then inspect how buffer.request() and format_descriptor::format() produce their format strings. Done means the mismatch is explained and the expected behavior or required change is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100