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

Handle dtypes like =d correctly. #44

Merged
merged 2 commits into from May 5, 2024

Conversation

chpatrick
Copy link
Contributor

"info.format" can contain either "d" or "=d" for native endianness, this handles that case.

@dancergraham
Copy link
Collaborator

Hello this seemed to fail but the logs are now longer available to explain why - do you recall what the problem was ?
Thanks,

@dancergraham
Copy link
Collaborator

ahh I'm starting to understand the vocabulary here - this is describing buffer format descriptors, right https://docs.python.org/3/library/struct.html

@dancergraham
Copy link
Collaborator

from reading the documentation it seems to me that =d and d are not necessarily the same - d would use standard size, whereas =d would use platform dependent c native size. I don't know enough about the different sizes of these data types on different platforms to know whether these differences are significant in practice ?

@dancergraham
Copy link
Collaborator

Hello @chpatrick can you provide any more information on this - are specific scanners generating files with =d ?

@chpatrick
Copy link
Contributor Author

The format string here depends on what Python decides for the buffer you provide, not the scanner. I'm not sure what the best thing is to do regarding the size.

To explain the code and trigger the ci
@dancergraham
Copy link
Collaborator

OK the tests pass I'm merging it like this for now and interested to read up some more on the subject. If you have any code which generates =d codes then I'm interested in trying it on both Windows and Linux to make sure it works OK

@dancergraham dancergraham merged commit dc1a529 into davidcaron:master May 5, 2024
13 checks passed
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 this pull request may close these issues.

None yet

2 participants