Issue334

Title Can't handle code with numba.jit()
Priority bug Status deferred
Superseder Nosy List CheeseLord
Assigned To Keywords

Created on 2016-11-03.20:52:09 by CheeseLord, last changed by kayhayen.

Messages
msg2045 (view) Author: kayhayen Date: 2016-11-05.06:58:44
That said, nuitka might of course learn to optimize numba calls like that away, 
but that's not happening soon. It will need more global optimization for that 
to work.

Yours,
Kay
msg2044 (view) Author: kayhayen Date: 2016-11-05.06:57:35
Wouldn't that be a bug for Numba to attempt to JIT bytecode that doesn't exist?

Nuitka provides an empty bytecode object. And a C implementation. The test 
object is not a Python function, they need to check that IMO.

Yours,
Kay
msg2042 (view) Author: CheeseLord Date: 2016-11-03.20:52:09
The following code works in Python 2.7.12 (with Anaconda) and outputs 42:

import numba
@numba.jit()
def test():
    return 42
print test()

However, when I compile with Nuitka 0.5.24rc1, I get the following error:

Traceback (most recent call last):
  File "/home/cheeselord/code/thing.py", line 5, in <module>
    print test()
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/numba/dispatcher.py",
line 277, in _compile_for_args
    return self.compile(tuple(real_args))
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/numba/dispatcher.py",
line 495, in compile
    cres = self._compiler.compile(args, return_type)
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/numba/dispatcher.py",
line 76, in compile
    flags=flags, locals=self.locals)
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/numba/compiler.py", line
696, in compile_extra
    return pipeline.compile_extra(func)
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/numba/compiler.py", line
367, in compile_extra
    raise e
ValueError: min() arg is an empty sequence
History
Date User Action Args
2018-03-14 13:36:48kayhayensetstatus: chatting -> deferred
2016-11-05 06:58:44kayhayensetmessages: + msg2045
2016-11-05 06:57:35kayhayensetstatus: unread -> chatting
messages: + msg2044
2016-11-03 20:52:09CheeseLordcreate