question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ipython kernel dies when using jit

See original GitHub issue

I am using numba on Windows 10 (64-bit) with Anaconda3 (v 5.2), numba 0.38.0, and numpy 1.14.3.

When I run the code attached below for test, ident_loops works just fine, but the ipython kernel dies if I use jit (jident_loops in the code). I tested it on spyder and jupyter notebook, but the kernel dies in both cases.

I tested the identical code on my previous machine (Ubuntu 16.04) without any problem, but it kills the kernel now. (Currently I have only Windows so I cannot test it on Ubuntu again).

I deleted Anaconda and re-installed, but nothing changed.

from numba import jit
import numpy as np

def ident_loops(x):
    r = np.empty_like(x)
    n = len(x)
    for i in range(n):
        r[i] = np.cos(x[i]) ** 2 + np.sin(x[i]) ** 2
    return r

@jit
def jident_loops(x):
    r = np.empty_like(x)
    n = len(x)
    for i in range(n):
        r[i] = np.cos(x[i]) ** 2 + np.sin(x[i]) ** 2
    return r

print(ident_loops(np.arange(1000)))
print(jident_loops(np.arange(1000)))

Any possible solution to this…?

Added: Some other examples, e.g., at documentation seem to work without problem. So now I guess my test code is seriously problematic…?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
generic-github-usercommented, Jun 24, 2021

I had this issue for a while as well - it turned out to be caused by an out-of-bounds NumPy array index, which was an easy fix once I figured it out. If possible, an explicit error message/warning could be very helpful for new users trying to figure out why the kernel is crashing.

0reactions
generic-github-usercommented, Jun 24, 2021

I see, thank you for clarifying.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python kernel dies when using numba overload - Stack Overflow
The problem was that I was running my python code in a iPython terminal using the neovim package "nvim-ipy". Running my code directly ......
Read more >
[spyder] Spyder ipython kernel dies with numba
and then open an ipython console, and then type. In [1]: from numba import jit. I get. Kernel died, restarting. I updated numba...
Read more >
Kernel Died error post installing tensorflow - Apple Developer
I m facing huge problem with Jupyter notebook post installing tensorflow as the kernel keeps dying and I have literally tried solution in...
Read more >
basics - Jupyter Notebook - MyBinder
In this notebook, we show some basic examples of using Numba. ... The most common Numba decorator is @jit , which creates a...
Read more >
raw kernel process exited code: undefined - You.com | The AI ...
jupyter kernel crashes when using Tensorflow with matplotlib from conda ... numpy as np from jax import jit import jax.numpy as jnp import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found