Skip to content

Commit 0122903

Browse files
ColtAllentwiecki
authored andcommitted
Rewrote st_impl for Poch and Factorial in terms of gamma Op
1 parent 654e7f3 commit 0122903

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/scalar/math.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ class Poch(BinaryScalarOp):
16231623

16241624
@staticmethod
16251625
def st_impl(z, m):
1626-
return scipy.special.poch(z, m)
1626+
return gamma(z+m) / gamma(z)
16271627

16281628
def impl(self, z, m):
16291629
return Poch.st_impl(z, m)
@@ -1653,7 +1653,7 @@ class Factorial(UnaryScalarOp):
16531653

16541654
@staticmethod
16551655
def st_impl(n):
1656-
return scipy.special.factorial(n)
1656+
return gamma(n+1)
16571657

16581658
def impl(self, n):
16591659
return Factorial.st_impl(n)

0 commit comments

Comments
 (0)