@@ -1556,15 +1556,15 @@ def _hyp2f1_da(a, b, c, z):
1556
1556
else :
1557
1557
term1 = _infinisum (
1558
1558
lambda k : (
1559
- (gamma (a + k ) / gamma (a ))
1560
- * (gamma (b + k ) / gamma (b ))
1561
- * psi (a + k )
1559
+ (scipy . special . gamma (a + k ) / scipy . special . gamma (a ))
1560
+ * (scipy . special . gamma (b + k ) / scipy . special . gamma (b ))
1561
+ * scipy . special . psi (a + k )
1562
1562
* (z ** k )
1563
1563
)
1564
- / (gamma (c + k ) / gamma (c ))
1565
- * gamma (k + 1 )
1564
+ / (scipy . special . gamma (c + k ) / scipy . special . gamma (c ))
1565
+ * scipy . special . gamma (k + 1 )
1566
1566
)
1567
- term2 = psi (a ) * hyp2f1 (a , b , c , z )
1567
+ term2 = scipy . special . psi (a ) * scipy . special . hyp2f1 (a , b , c , z )
1568
1568
1569
1569
return term1 - term2
1570
1570
@@ -1579,15 +1579,15 @@ def _hyp2f1_db(a, b, c, z):
1579
1579
else :
1580
1580
term1 = _infinisum (
1581
1581
lambda k : (
1582
- (gamma (a + k ) / gamma (a ))
1583
- * (gamma (b + k ) / gamma (b ))
1584
- * psi (b + k )
1582
+ (scipy . special . gamma (a + k ) / scipy . special . gamma (a ))
1583
+ * (scipy . special . gamma (b + k ) / scipy . special . gamma (b ))
1584
+ * scipy . special . psi (b + k )
1585
1585
* (z ** k )
1586
1586
)
1587
- / (gamma (c + k ) / gamma (c ))
1588
- * gamma (k + 1 )
1587
+ / (scipy . special . gamma (c + k ) / scipy . special . gamma (c ))
1588
+ * scipy . special . gamma (k + 1 )
1589
1589
)
1590
- term2 = psi (b ) * hyp2f1 (a , b , c , z )
1590
+ term2 = scipy . special . psi (b ) * scipy . special . hyp2f1 (a , b , c , z )
1591
1591
1592
1592
return term1 - term2
1593
1593
@@ -1599,16 +1599,16 @@ def _hyp2f1_dc(a, b, c, z):
1599
1599
raise NotImplementedError ("Gradient not supported for |z| >= 1" )
1600
1600
1601
1601
else :
1602
- term1 = psi (c ) * hyp2f1 (a , b , c , z )
1602
+ term1 = scipy . special . psi (c ) * scipy . special . hyp2f1 (a , b , c , z )
1603
1603
term2 = _infinisum (
1604
1604
lambda k : (
1605
- (gamma (a + k ) / gamma (a ))
1606
- * (gamma (b + k ) / gamma (b ))
1607
- * psi (c + k )
1605
+ (scipy . special . gamma (a + k ) / scipy . special . gamma (a ))
1606
+ * (scipy . special . gamma (b + k ) / scipy . special . gamma (b ))
1607
+ * scipy . special . psi (c + k )
1608
1608
* (z ** k )
1609
1609
)
1610
- / (gamma (c + k ) / gamma (c ))
1611
- * gamma (k + 1 )
1610
+ / (scipy . special . gamma (c + k ) / scipy . special . gamma (c ))
1611
+ * scipy . special . gamma (k + 1 )
1612
1612
)
1613
1613
return term1 - term2
1614
1614
@@ -1617,7 +1617,7 @@ def _hyp2f1_dz(a, b, c, z):
1617
1617
Derivative of hyp2f1 wrt z
1618
1618
"""
1619
1619
1620
- return ((a * b ) / c ) * hyp2f1 (a + 1 , b + 1 , c + 1 , z )
1620
+ return ((a * b ) / c ) * scipy . special . hyp2f1 (a + 1 , b + 1 , c + 1 , z )
1621
1621
1622
1622
if wrt == 0 :
1623
1623
return _hyp2f1_da (a , b , c , z )
0 commit comments