Remove Function.prepare_for_call property - #312
Merged
Conversation
If `signature_shape` of all the arguments of a ufunc is `"()"` then the ufunc is a normal ufunc, but if there is an argument with a different `signature_shape` then the ufunc is a gufunc. So far for the latter `erfa_generator` has created code for processing all input arguments, then inout arguments and finally output arguments, but now it processes first all the arguments with `signature_shape` different from `"()"` and after that all the rest. This change in the order of statements in gufuncs allows `erfa_generator` to be simplified by removing the `Function.prepare_for_call` abstract property and its implementations in the `UFunc` and `GUFunc` classes without complicating generated code.
avalentino
approved these changes
Aug 7, 2026
This file contains hidden or 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
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.
This is another PR where re-ordering statements in the generated C code allows
erfa_generatorto be simplified.If
signature_shapeof all the arguments of a ufunc is"()"then the ufunc is a normal ufunc, but if there is an argument with a differentsignature_shapethen the ufunc is a gufunc. So far for the lattererfa_generatorhas created code for processing all input arguments, then inout arguments and finally output arguments, but now it processes first all the arguments withsignature_shapedifferent from"()"and after that all the rest.