Skip to content

Commit f136680

Browse files
committed
Add docstring to a new function and update CHANGES
1 parent 2a3fb4f commit f136680

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

CHANGES.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ Mathics scanner exceptions of class TranslateError are incompatible
1818
with previous versions, and now store error parameters, "name", "tag", and
1919
"args".
2020

21+
WMA Compatibility
22+
-----------------
23+
24+
Hypergeometric functions have been revised to conform better to WMA behavior by
25+
expanding hypergeometric results.
26+
27+
Bugs
28+
----
29+
30+
* Fixed #1187
31+
32+
33+
2134
8.0.1
2235
-----
2336

mathics/eval/specialfns/hypergeom.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)