BUG: Fix incorrect brackets in cephes hyperg.h #20745
Merged
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.
Reference issue
This is fixes one of the warnings mentioned in #20740, but would not be sufficient to close that issue.
What does this implement/fix?
This PR fixes some incorrect bracketing in
hy1f1a
inscipy/special/special/cephes/hyperg.h
. While translatingcephes
into C++, in some places I added brackets in one lineif
blocks which omitted them, but in this case I added the opening bracket but not the closing bracket. I've simply removed this extraneous opening bracket to bring the code to it's original state.Additional information
The
cephes
implementation ofhyp1f1
is not well tested because we useBoost
for thehyp1f1
ufunc. Thecephes
hyp1f1
is only used inorthogonal_eval.pxd
in the functioneval_genlaguerre
. I briefly tried to find a test case foreval_genlaguerre
which would hit the control path without a return value, but couldn't find one. I think it's fine not to include a test case; one can compare this PR to the original cephes code.scipy/scipy/special/cephes/hyperg.c
Lines 237 to 247 in f133c27
Thanks @fancidev for bringing this to our attention in #20740