Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISIOWrap broken for int64/uint64 (on some architectures?) #51

Closed
DasVinch opened this issue Aug 4, 2023 · 2 comments · Fixed by #52
Closed

ISIOWrap broken for int64/uint64 (on some architectures?) #51

DasVinch opened this issue Aug 4, 2023 · 2 comments · Fixed by #52
Assignees

Comments

@DasVinch
Copy link
Member

DasVinch commented Aug 4, 2023

I'm having an issue where I can't instantiate int64/uint64 Images from ISIOWrap.

it boils down to a type descriptor mismatch between what is consider "long" and "long long". in ImageStreamIODataType PyFormatToImageStreamIODataType(const std::string &pf) and the reverse function.

What I pass down from numpy as pf == "l" and "L" respectivelent for np.int64 and np.uint64...
However... py::format_descriptor<int64_t>::format() is q and the uint version returns Q.

Per https://numpy.org/doc/stable/reference/arrays.scalars.html, I understand this is a variation in the spec between int and longlong...
I think (from my very quick browsing) that this has been introduced at 1.16. It is possible that I haven't tried to make a uint64 SHM for all that time.

Oh no!

@a-sevin
Copy link
Member

a-sevin commented Aug 4, 2023

I'm in vacation with a short time to check my mail. The solution could be here: pybind/pybind11#1908 (comment)

@a-sevin
Copy link
Member

a-sevin commented Aug 4, 2023

when py::format_descriptor<int64_t>::format() is q and the uint version returns Q, it means you are on a 32bit linux...
But I have the same issue on my laptop... Strange...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants