-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor g2clib cython #171
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function _toarray() rewritten to remove loop and use memcpy instead; removal of deprecated Python C API PyObject_AsWriteBuffer() Function unpack7() heavily modified to test handling arguments in a less clunky way, especially input numpy arrays. These new approaches will trickle into other functions.
unpack7() - clean up of commented code grib2_create() - refactored
Rearranged order of GRIB2 creation functions. Refactored grib2_local() and grib2_end().
Refactored grib2_addgrid() which includes some minor changes to _grib2io.py when defining _deflist.
Refactored grib2_addfield() and some associated minor changes to _grib2io.py
Remove function definitions from Python.h that are no longer needed.
Refactored unpack1() and unpack7(). These funcitons no longer pass grbpos and np.empty into the Cython functions. We are able to pass np.empty() return directly into _toarray() from unpack*() functions.
Refactored unpack[3,4,5,6]() functions and associated changes to _grib2io.py.
Clean up of now unused functions defined in Python.h In np.empty calls, changed string dtype to real numpy dtype.
Mainly docblock updates, but some minor code changes and variable renaming for consistency. Some minor changes to _grib2io.py.
Closed
[skip ci]
I pulled this commit to test with 3.13, and with several model types (NDFD, NBM, MRMS) I saw the following in the REPL:
I don't think this is actually supposed to work with 3.13 yet, but thought I'd share anyways in case it is useful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.