Numba: How To Suppress
I keep on getting this error in my numba code: Warning 101:0: Unused argument 'self' My numba code is below. How do I suppress the error message? @autojit def initialise_output_d
Solution 1:
You can suppress all numba warnings on a specific function with warn=False
. For example:
@numba.autojit(warn=False)deff(a, b):
return a
f doesn't use b but numba does not issue a warning. This works for @numba.jit
also. Just be careful!
Solution 2:
As autojit doesn't seem to exist anymore, and numba.jit doesn't accept the argument warn, some imperfect ways to handle this may be:
Disable all Numba messages of level WARNING or lower
import logging; logger = logging.getLogger("numba"); logger.setLevel(logging.ERROR)
Disable all messages of level WARNING or lower altogether
import logging; logging.disable(logging.WARNING)
Post a Comment for "Numba: How To Suppress"