numba Package

numba Package

Expose top-level symbols that are safe for import *

_version Module

numba._version.get_expanded_variables(versionfile_source)
numba._version.get_versions(default={'version': 'unknown', 'full': ''}, verbose=False)
numba._version.run_command(args, cwd=None, verbose=False)
numba._version.versions_from_expanded_variables(variables, tag_prefix, verbose=False)
numba._version.versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False)
numba._version.versions_from_vcs(tag_prefix, versionfile_source, verbose=False)

ad Module

array_expressions Module

array_validation Module

ast_constant_folding Module

astsix Module

closures Module

config Module

decorators Module

Contains function decorators and target_registry

numba.decorators.autojit(*args, **kws)

Deprecated.

Use jit instead. Calls to jit internally.

numba.decorators.jit(signature_or_function=None, argtypes=None, restype=None, locals={}, target='cpu', **targetoptions)

jit([signature_or_function, [locals={}, [target=’cpu’, [**targetoptions]]]])

The function can be used as the following versions:

  1. jit(signature, [target=’cpu’, [**targetoptions]]) -> jit(function)

    Equivalent to:

    d = dispatcher(function, targetoptions) d.compile(signature)

    Create a dispatcher object for a python function and default target-options. Then, compile the funciton with the given signature.

    Example:

    @jit(“void(int32, float32)”) def foo(x, y):

    return x + y

  2. jit(function) -> dispatcher

    Same as old autojit. Create a dispatcher function object that specialize at call site.

    Example:

    @jit def foo(x, y):

    return x + y

  3. jit([target=’cpu’, [**targetoptions]]) -> configured_jit(function)

    Same as old autojit and 2). But configure with target and default target-options.

    Example:

    @jit(target=’cpu’, nopython=True) def foo(x, y):

    return x + y

The CPU (default target) defines the following:

  • nopython: [bool]

    Set to True to disable the use of PyObjects and Python API calls. The default behavior is to allow the use of PyObjects and Python API. Default value is False.

  • forceobj: [bool]

    Set to True to force the use of PyObjects for every value. Default value is False.

numba.decorators.njit(*args, **kws)

Equavilent to jit(nopython=True)

environment Module

error Module

exception numba.error.NumbaError(node, msg=None, *args, **kwds)

Bases: exceptions.Exception

Some error happened during compilation

exception numba.error.InternalError

Bases: exceptions.Exception

Indicates a compiler bug

exception numba.error.InvalidTemplateError

Bases: exceptions.Exception

Raised for invalid template type specifications

function_util Module

functions Module

lexing Module

llvm_types Module

macros Module

metadata Module

missing Module

multiarray_api Module

naming Module

ndarray_helpers Module

normalize Module

odict Module

class numba.odict.OrderedDict(*args, **kwds)

Bases: dict, UserDict.DictMixin

clear()
copy()
classmethod fromkeys(iterable, value=None)
items()
iteritems()
iterkeys()
itervalues()
keys()
pop(key, *args)
popitem(last=True)
setdefault(key, default=None)
update(other=None, **kwargs)
values()

oset Module

Ordered Set. See http://code.activestate.com/recipes/576694/

class numba.oset.OrderedSet(iterable=None)

Bases: _abcoll.MutableSet

add(key)
discard(key)
pop(last=True)
update(it)

parallel Module

pipeline Module

postpasses Module

prettyprint Module

reporting Module

scrape_multiarray_api Module

special Module

numba.special.typeof(val)

Get the type of a variable or value.

Used outside of Numba code, infers the type for the object.

stdio_util Module

symtab Module

templating Module

threads Module

traits Module

Minimal traits implementation:

@traits class MyClass(object):

attr = Instance(SomeClass) my_delegation = Delegate(‘attr’)
numba.traits.Delegate

Delegate to some other object.

class numba.traits.TraitBase(value, doc=None)

Bases: object

Base class for traits

set_attr_name(name)
numba.traits.traits(cls)

@traits class decorator

transforms Module

typedefs Module

ufunc_builder Module

utils Module

class numba.utils.BenchmarkResult(func, records, loop)

Bases: object

class numba.utils.ConfigOptions

Bases: object

OPTIONS = ()
set(name)
unset(name)
class numba.utils.SortedMap(seq)

Bases: _abcoll.Mapping

Immutable

class numba.utils.SortedSet(seq)

Bases: _abcoll.Set

class numba.utils.UniqueDict

Bases: dict

numba.utils.benchmark(func, maxsec=1)
numba.utils.bit_length(intval)
numba.utils.dict_iteritems(d)
numba.utils.dict_itervalues(d)
numba.utils.dict_keys(d)
numba.utils.dict_values(d)
numba.utils.format_time(tm)
numba.utils.func_globals(f)
numba.utils.iter_next(it)
numba.utils.longint(v)
numba.utils.runonce(fn)

validate Module

visitors Module

Subpackages