Make dtype::num() return type consistent with other functions#3995
Make dtype::num() return type consistent with other functions#3995Skylion007 merged 1 commit intopybind:masterfrom
Conversation
|
WHAT IS THE TYPE OF `return detail::array_descriptor_proxy(m_ptr)->type_num
;`
…On Mon, Jun 6, 2022 at 4:24 PM Maarten Baert ***@***.***> wrote:
Description
Pybind uses int to represent dtype numbers everywhere in the API, except
for the newly added dtype::num() function, which for some reason uses
ssize_t. This commit fixes that and makes it consistent with the other
functions.
------------------------------
You can view, comment on, or merge this pull request online at:
#3995
Commit Summary
- 2c91f4d
<2c91f4d>
Make dtype::num() return type consistent with other functions
File Changes
(1 file <https://github.com/pybind/pybind11/pull/3995/files>)
- *M* include/pybind11/numpy.h
<https://github.com/pybind/pybind11/pull/3995/files#diff-32496cc1f174bae1792ee91e0228cb198995509d66c039d64a3739f9c777cf10>
(2)
Patch Links:
- https://github.com/pybind/pybind11/pull/3995.patch
- https://github.com/pybind/pybind11/pull/3995.diff
—
Reply to this email directly, view it on GitHub
<#3995>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPVMX2ROM52PIPR4KGGKYTVNZNA5ANCNFSM5YATE5CA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It's pybind11/include/pybind11/numpy.h Line 58 in c5fa343 When reviewing PR #3868 I missed this mismatch. LGTM, but @MaartenBaert, how did you find this? Did it break anything? It would be good to explain in the PR description. |
It didn't break anything, I just noticed the mismatch between the new constructor and the |
Description
Pybind uses
intto represent dtype numbers everywhere in the API, except for the newly addeddtype::num()function, which for some reason uses ssize_t. This commit fixes that and makes it consistent with the other functions.