Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive calls raise errors with @jitclass (but not @jit) #3018

Open
allComputableThings opened this issue Jun 6, 2018 · 4 comments
Open

Comments

@allComputableThings
Copy link

allComputableThings commented Jun 6, 2018

Feature request

Reporting a bug

@numba.jit
def x(i):
    if i>0:
        x(i-1)

@numba.jitclass(())
class C(object):
    def __init__(self):
        pass

    def x(self, i):
        if i>0:
            self.x(i-1)
x(6) # OK
C().x(6)  # Fail

Since recursive calls work for @jit functions, I'd think they'd work for @jitclass methods. Instead they raise:

  compiler re-entrant to the same function signature
@aldanor
Copy link

aldanor commented Jul 5, 2019

Wondering if there's any chance for this to be resolved?

Currently you have to run a bunch of ugly external functions to work around this and/or stop using jitclasses.

@joefutrelle
Copy link

@aldanor can you detail some of the workarounds you used? I need this capability and it looks like this issue is not close to resolution.

@juliusbierk
Copy link
Contributor

Bump.

@eiis1000
Copy link

Any updates? This seems like a pretty important feature to not be supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants