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

Type check #232

Merged
merged 8 commits into from
Jan 3, 2025
Merged

Type check #232

merged 8 commits into from
Jan 3, 2025

Conversation

danbeibei
Copy link

@danbeibei danbeibei commented Nov 18, 2024

This PR sits on top of #230 and #231
Update the type check feature that checks the Python types that are passed to Fortran routines.
Improves #182:

  • Support for optional arguments
  • Better support for strings
  • Better error messages when it fails
  • Be less strict with scalar input:
    When the wrapper is not wrapping a Fortran interface, use numpy astype member function to convert types to the right size. For instance, int32 to int64. This makes the Python wrapper interfaces more Pythonic.
    When the wrapper is wrapping a Fortran interface, the behavior stays the same, strict type matching between Python input type and the Fortran signature is required so that the correct Fortran routine is called.

@jameskermode jameskermode merged commit 4f73f41 into jameskermode:master Jan 3, 2025
9 of 23 checks passed
@danbeibei danbeibei deleted the type_check branch January 7, 2025 10:20
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.

2 participants