Is it possible to get a stack trace/line numbers when an exception happens?

0 views
Skip to first unread message

krey...@gmail.com

unread,
Mar 26, 2018, 9:28:15 AM3/26/18
to Numba Public Discussion - Public

I'm finding it very difficult to work with numba because I never know where my errors occur.

import numba

@numba.jit(numba.double(numba.double, numba.double))
def divide(x, y):
   
return x/y

@numba.jit()
def try_dividing():
    divide
(4, 3)
    divide
(5, 0)
    divide
(6, 1)

try_dividing
()


ZeroDivisionError                         Traceback (most recent call last)
<ipython-input-28-2a0700d9ee0b> in <module>()
     
11     divide(6, 1)
     
12
---> 13 try_dividing()

ZeroDivisionError: division by zero

Is it possible to get more detailed error messages?

krey...@gmail.com

unread,
Mar 31, 2018, 10:56:25 AM3/31/18
to Numba Public Discussion - Public
Is this the wrong place for asking such a question?

Searching around,I haven't been able to find any references/answers to it.

Thank you

Juan Nunez-Iglesias

unread,
Mar 31, 2018, 7:50:21 PM3/31/18
to numba...@continuum.io
I don’t think it’s the wrong place and would be curious about any advice from devs. Having said that what *I* do when debugging Numba code is run it with NUMBA_DISABLE_JIT=1, at which point it’s just normal Python code. =)
--
You received this message because you are subscribed to the Google Groups "Numba Public Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users...@continuum.io.
To post to this group, send email to numba...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/numba-users/8ad14e19-afed-444c-98a5-6a0cf215594f%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Reply all
Reply to author
Forward
0 new messages