All Questions
4 questions
-3
votes
2
answers
209
views
How to prevent a recursion error implementing factorial in Python
I'm developing a math suite and am currently having issues implementing the recursive version of the factorial function. The issue is when I use it in my Bayesian combination function:
C(n,k) = n! / k!...
5
votes
0
answers
749
views
Removing call from stack trace in python
I'm using a recursive function that doesn't directly call itself, but throught other private methods, for example:
def recur(x):
# do something
__a(x)
def __a(x):
# do something
__b(...
3
votes
3
answers
80
views
Recursion done inside of a variable
I am a bit confused on how the compiler does recursion if it is in a variable. The only way to easily explain the question is if I show an example.
def recur_var(s1, s2):
'''Test for recursion in ...
0
votes
2
answers
482
views
Python Max Recursion Depth
I am implementing some sorting algorithm in Python and encountered a somewhat strange bug related to max recursion depth being exceeded. In one module, I have implemented an insertion,m erge, and ...