Reporting a bug
Python 2.7 has an issue with this:
from numba import njit
import numpy as np
@njit
def foo(arg1, arg2):
return 10
a = [np.array([ True]), np.array([False, True, False])]
b = [np.array([1]), np.array([[ 0, 1, 2]])]
try:
print(foo(1, b)) # ok, TypeError
except TypeError:
pass
print(foo(a, b)) # broken
which gives:
test_pr_4077.py:15: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
print(foo(a, b)) # broken
Traceback (most recent call last):
File "test_pr_4077.py", line 15, in <module>
print(foo(a, b)) # broken
SystemError: NULL result without error in PyObject_Call
seems like it's the unbox of the second list that's the problem where it types it as a types.List(types.Array(int64, 1,'C')) but the second element is a 2d array. Why it only impacts the second use case and Python 2.7 (3.x is fine) needs more investigation.
Reporting a bug
latest releasedmaster version of Numba (most recent is visible inthe change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).
Python 2.7 has an issue with this:
which gives:
seems like it's the unbox of the second list that's the problem where it types it as a
types.List(types.Array(int64, 1,'C'))but the second element is a 2d array. Why it only impacts the second use case and Python 2.7 (3.x is fine) needs more investigation.