Create a struct type. Fields may be ordered or unordered. Unordered fields will be ordered from big types to small types (for better alignment).
>>> struct([('a', int_), ('b', float_)], name='Foo') # ordered struct
struct Foo { int a, float b }
>>> struct(a=int_, b=float_, name='Foo') # unordered struct
struct Foo { float b, int a }
>>> struct(a=int32, b=int32, name='Foo') # unordered struct
struct Foo { int32 a, int32 b }
>>> S = struct(a=complex128, b=complex64, c=struct(f1=double, f2=double, f3=int32))
>>> S
struct { struct { double f1, double f2, int32 f3 } c, complex128 a, complex64 b }
>>> S.offsetof('a')
24
Creates a function that dispatches to type-specialized LLVM functions based on the input argument types. If no specialized function exists for a set of input argument types, the dispatcher creates and caches a new specialized function at call time.
Compile a function given the input and return types.
There are multiple ways to specify the type signature:
If backend=’bytecode’ the bytecode translator is used, if backend=’ast’ the AST translator is used. By default, the AST translator is used. Note that the bytecode translator is deprecated as of the 0.3 release.
Construct a decorator that takes a function and exports one
A signature is a string with
name ret_type(arg_type, argtype, ...)
A Decorator that exports many signatures for a single function
Get the type of a variable.
Used outside of Numba code, infers the type for the object.