4 ms·
definitely a lot faster than pandas! question: how do you debug a function which has a super complex decorator slapped on top of it?
by 451mov 9y ago
definitely a lot faster than pandas!
question: how do you debug a function which has a super complex decorator slapped on top of it?
- dagw 9y agoquestion: how do you debug a function which has a super complex decorator slapped on top of it? With difficulty. If you find yourself in a situation where you have a function that works without the numba decorator, but fails with it then it's time to break out your llvm reading skills: http://numba.pydata.org/numba-doc/0.10/annotate.html http://numba.pydata.org/numba-doc/0.10/annotate.html That being said it is very rare that that happens.
- marmaduke 9y agoYou can just remove the decorator?
- glup 9y agoNo, because certain things are fine in an interpreted function that will fail to compile, and throw totally uninformative errors. E.g., one time I spent about 3 hours trying to figure out why a relatively simple, perfectly functional Numpy function, limited to the subset of Numba primitives wouldn't compile. A labmate with actual knowledge of C looked at the code and in about 30 seconds suggested it might be having two return statements; she was of course correct that this was the problem. Doh.
- marmaduke 9y agoOk but generally it is possible to debug by omitting the decorator.