@@ -33,7 +33,7 @@ def eval_Hypergeometric1F1(a, b, z):
3333 )
3434 expanded_result = sympy .hyperexpand (sympy_result )
3535
36- # Oddly, expansion sometimes doesn't work for when complex arguments are given.
36+ # Oddly, SymPy expansion sometimes doesn't work when complex arguments are given.
3737 # However mpmath can handle this.
3838 # I imagine at some point in the future this will be fixed.
3939 if isinstance (expanded_result , sympy .hyper ) and all_numeric :
@@ -80,7 +80,7 @@ def eval_Hypergeometric2F1(a, b, c, z):
8080 mpmath .hyp2f1 , * cast (Sequence [Number ], args ), prec = prec
8181 )
8282 else :
83- return run_sympy_hyper (
83+ return run_sympy_hyper_and_expand (
8484 [sympy_args [0 ], sympy_args [1 ]], [sympy_args [2 ]], sympy_args [3 ]
8585 )
8686
@@ -90,7 +90,7 @@ def eval_HypergeometricPQF(a, b, z):
9090 try :
9191 a_sympy = [e .to_sympy () for e in a ]
9292 b_sympy = [e .to_sympy () for e in b ]
93- return run_sympy_hyper (a_sympy , b_sympy , z .to_sympy ())
93+ return run_sympy_hyper_and_expand (a_sympy , b_sympy , z .to_sympy ())
9494 except Exception :
9595 return None
9696
@@ -143,7 +143,8 @@ def eval_MeijerG(a, b, z):
143143# return None
144144
145145
146- def run_sympy_hyper (a , b , z ):
146+ def run_sympy_hyper_and_expand (a , b , z ):
147+ """Ruy SymPy's hyper function and expand the result."""
147148 sympy_result = tracing .run_sympy (sympy .hyper , a , b , z )
148149 result = sympy .hyperexpand (sympy_result )
149150 return from_sympy (result )
0 commit comments