numba.typing package¶
Submodules¶
numba.typing.builtins module¶
- class numba.typing.builtins.Abs(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int32,) -> int32, (int16,) -> int16, (int64,) -> int64, (int8,) -> int8, (float32,) -> float32, (float64,) -> float64, (complex64,) -> float32, (complex128,) -> float64]¶
- complex_cases = [(complex64,) -> float32, (complex128,) -> float64]¶
- int_cases = [(int32,) -> int32, (int16,) -> int16, (int64,) -> int64, (int8,) -> int8]¶
- key = abs¶
- real_cases = [(float32,) -> float32, (float64,) -> float64]¶
- ty = complex128¶
- class numba.typing.builtins.ArrayAttribute(context)¶
Bases: numba.typing.templates.AttributeTemplate
- generic_resolve(ary, attr)¶
- key¶
alias of Array
- resolve_flat(ary)¶
- resolve_ndim(ary)¶
- resolve_prod(ary)¶
- resolve_shape(ary)¶
- resolve_size(ary)¶
- resolve_strides(ary)¶
- resolve_sum(ary)¶
- class numba.typing.builtins.Array_prod(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'array.prod'¶
- class numba.typing.builtins.Array_sum(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'array.sum'¶
- class numba.typing.builtins.BinOp(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> int64, (int16, int16) -> int64, (int32, int32) -> int64, (int64, int64) -> int64, (uint8, uint8) -> uint64, (uint16, uint16) -> uint64, (uint32, uint32) -> uint64, (uint64, uint64) -> uint64, (float32, float32) -> float32, (float64, float64) -> float64, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- op = complex128¶
- class numba.typing.builtins.BinOpAdd(context)¶
Bases: numba.typing.builtins.BinOp
- key = '+'¶
- class numba.typing.builtins.BinOpDiv(context)¶
Bases: numba.typing.builtins.BinOp
- key = '/?'¶
- class numba.typing.builtins.BinOpFloorDiv(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> int8, (int16, int16) -> int16, (int32, int32) -> int32, (int64, int64) -> int64, (uint8, uint8) -> uint8, (uint16, uint16) -> uint16, (uint32, uint32) -> uint32, (uint64, uint64) -> uint64, (float32, float32) -> float32, (float64, float64) -> float64]¶
- key = '//'¶
- op = float64¶
- class numba.typing.builtins.BinOpMod(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> int8, (int16, int16) -> int16, (int32, int32) -> int32, (int64, int64) -> int64, (uint8, uint8) -> uint8, (uint16, uint16) -> uint16, (uint32, uint32) -> uint32, (uint64, uint64) -> uint64, (float32, float32) -> float32, (float64, float64) -> float64]¶
- key = '%'¶
- op = float64¶
- class numba.typing.builtins.BinOpMul(context)¶
Bases: numba.typing.builtins.BinOp
- key = '*'¶
- class numba.typing.builtins.BinOpPower(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int64, int64) -> int64, (float64, int8) -> float64, (float64, int16) -> float64, (float64, int32) -> float64, (float64, int64) -> float64, (float64, uint8) -> float64, (float64, uint16) -> float64, (float64, uint32) -> float64, (float64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- key = '**'¶
- op = complex128¶
- class numba.typing.builtins.BinOpSub(context)¶
Bases: numba.typing.builtins.BinOp
- key = '-'¶
- class numba.typing.builtins.BinOpTrueDiv(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> float64, (int16, int16) -> float64, (int32, int32) -> float64, (int64, int64) -> float64, (uint8, uint8) -> float64, (uint16, uint16) -> float64, (uint32, uint32) -> float64, (uint64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- key = '/'¶
- op = complex128¶
- class numba.typing.builtins.BitwiseAnd(context)¶
Bases: numba.typing.builtins.BitwiseLogicOperation
- key = '&'¶
- class numba.typing.builtins.BitwiseInvert(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(bool,) -> int8, (int8,) -> int8, (int16,) -> int16, (int32,) -> int32, (int64,) -> int64, (uint8,) -> uint8, (uint16,) -> uint16, (uint32,) -> uint32, (uint64,) -> uint64]¶
- key = '~'¶
- op = uint64¶
- class numba.typing.builtins.BitwiseLeftShift(context)¶
Bases: numba.typing.builtins.BitwiseShiftOperation
- key = '<<'¶
- class numba.typing.builtins.BitwiseLogicOperation(context)¶
Bases: numba.typing.builtins.BinOp
- cases = [(int8, int8) -> int64, (int16, int16) -> int64, (int32, int32) -> int64, (int64, int64) -> int64, (uint8, uint8) -> uint64, (uint16, uint16) -> uint64, (uint32, uint32) -> uint64, (uint64, uint64) -> uint64]¶
- op = uint64¶
- class numba.typing.builtins.BitwiseOr(context)¶
Bases: numba.typing.builtins.BitwiseLogicOperation
- key = '|'¶
- class numba.typing.builtins.BitwiseRightShift(context)¶
Bases: numba.typing.builtins.BitwiseShiftOperation
- key = '>>'¶
- class numba.typing.builtins.BitwiseShiftOperation(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, uint32) -> int8, (int16, uint32) -> int16, (int32, uint32) -> int32, (int64, uint32) -> int64, (uint8, uint32) -> uint8, (uint16, uint32) -> uint16, (uint32, uint32) -> uint32, (uint64, uint32) -> uint64]¶
- op = uint64¶
- class numba.typing.builtins.BitwiseXor(context)¶
Bases: numba.typing.builtins.BitwiseLogicOperation
- key = '^'¶
- class numba.typing.builtins.Bool(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key¶
alias of bool
- class numba.typing.builtins.Caster(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.builtins.CmpOpEq(context)¶
Bases: numba.typing.builtins.UnorderedCmpOp
- key = '=='¶
- class numba.typing.builtins.CmpOpEqArray(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = '=='¶
- class numba.typing.builtins.CmpOpGe(context)¶
Bases: numba.typing.builtins.OrderedCmpOp
- key = '>='¶
- class numba.typing.builtins.CmpOpGt(context)¶
Bases: numba.typing.builtins.OrderedCmpOp
- key = '>'¶
- class numba.typing.builtins.CmpOpIdentity(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.builtins.CmpOpIs(context)¶
Bases: numba.typing.builtins.CmpOpIdentity
- key = 'is'¶
- class numba.typing.builtins.CmpOpIsNot(context)¶
Bases: numba.typing.builtins.CmpOpIdentity
- key = 'is not'¶
- class numba.typing.builtins.CmpOpLe(context)¶
Bases: numba.typing.builtins.OrderedCmpOp
- key = '<='¶
- class numba.typing.builtins.CmpOpLt(context)¶
Bases: numba.typing.builtins.OrderedCmpOp
- key = '<'¶
- class numba.typing.builtins.CmpOpNe(context)¶
Bases: numba.typing.builtins.UnorderedCmpOp
- key = '!='¶
- class numba.typing.builtins.Complex(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key¶
alias of complex
- class numba.typing.builtins.ComplexAttribute(context)¶
Bases: numba.typing.templates.AttributeTemplate
- resolve_conjugate(ty)¶
- resolve_imag(ty)¶
- resolve_real(ty)¶
- class numba.typing.builtins.Enumerate(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key¶
alias of enumerate
- class numba.typing.builtins.Float(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key¶
alias of float
- class numba.typing.builtins.GetItemArray(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'getitem'¶
- class numba.typing.builtins.GetItemUniTuple(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'getitem'¶
- class numba.typing.builtins.GetIter(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'getiter'¶
- class numba.typing.builtins.Int(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key¶
alias of int
- class numba.typing.builtins.Intrinsic_array_ravel(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key(arr)¶
Flatten a C/F array into a 1D array without enforcing the ordering of the each element.
arr: array
A flattened 1D array
- class numba.typing.builtins.IterNext(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'iternext'¶
- class numba.typing.builtins.LenArray(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = len¶
- class numba.typing.builtins.Max(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key()¶
max(iterable[, key=func]) -> value max(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its largest item. With two or more arguments, return the largest argument.
- class numba.typing.builtins.Min(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key()¶
min(iterable[, key=func]) -> value min(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its smallest item. With two or more arguments, return the smallest argument.
- class numba.typing.builtins.NumbaTypesModuleAttribute(context)¶
Bases: numba.typing.templates.AttributeTemplate
- key = Module(<module 'numba.types' from '/Users/stan/anaconda/envs/numba_dev/lib/python2.7/site-packages/numba/types.pyc'>)¶
- resolve_complex128(mod)¶
- resolve_complex64(mod)¶
- resolve_float32(mod)¶
- resolve_float64(mod)¶
- resolve_int16(mod)¶
- resolve_int32(mod)¶
- resolve_int64(mod)¶
- resolve_int8(mod)¶
- resolve_uint16(mod)¶
- resolve_uint32(mod)¶
- resolve_uint64(mod)¶
- resolve_uint8(mod)¶
- class numba.typing.builtins.OrderedCmpOp(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(bool, bool) -> bool, (int8, int8) -> bool, (int16, int16) -> bool, (int32, int32) -> bool, (int64, int64) -> bool, (uint8, uint8) -> bool, (uint16, uint16) -> bool, (uint32, uint32) -> bool, (uint64, uint64) -> bool, (float32, float32) -> bool, (float64, float64) -> bool]¶
- op = float64¶
- class numba.typing.builtins.PairFirst(context)¶
Bases: numba.typing.templates.AbstractTemplate
Given a heterogenous pair, return the first element.
- generic(args, kws)¶
- key = 'pair_first'¶
- class numba.typing.builtins.PairSecond(context)¶
Bases: numba.typing.templates.AbstractTemplate
Given a heterogenous pair, return the second element.
- generic(args, kws)¶
- key = 'pair_second'¶
- class numba.typing.builtins.PowerBuiltin(context)¶
Bases: numba.typing.builtins.BinOpPower
- key()¶
pow(x, y[, z]) -> number
With two arguments, equivalent to x**y. With three arguments, equivalent to (x**y) % z, but may be more efficient (e.g. for longs).
- class numba.typing.builtins.Print(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(uint64,) -> none, (int32,) -> none, (int16,) -> none, (uint8,) -> none, (uint32,) -> none, (uint16,) -> none, (int64,) -> none, (int8,) -> none, (float32,) -> none, (float64,) -> none]¶
- intcases = [(uint64,) -> none, (int32,) -> none, (int16,) -> none, (uint8,) -> none, (uint32,) -> none, (uint16,) -> none, (int64,) -> none, (int8,) -> none]¶
- key = print¶
- realcases = [(float32,) -> none, (float64,) -> none]¶
- ty = float64¶
- class numba.typing.builtins.PrintOthers(context)¶
Bases: numba.typing.templates.AbstractTemplate
- accepted_types(ty)¶
- generic(args, kws)¶
- key = print¶
- class numba.typing.builtins.Range(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int32,) -> range_state32, (int32, int32) -> range_state32, (int32, int32, int32) -> range_state32, (int64,) -> range_state64, (int64, int64) -> range_state64, (int64, int64, int64) -> range_state64]¶
- key = range¶
- class numba.typing.builtins.Round(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(float32,) -> float32, (float64,) -> float64]¶
- key()¶
round(number[, ndigits]) -> floating point number
Round a number to a given precision in decimal digits (default 0 digits). This always returns a floating point number. Precision may be negative.
- class numba.typing.builtins.SetItemArray(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = 'setitem'¶
- class numba.typing.builtins.Slice(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [() -> slice3_type, (none, none) -> slice3_type, (none, int64) -> slice3_type, (int64, none) -> slice3_type, (int64, int64) -> slice3_type, (int64, int64, int64) -> slice3_type]¶
- key = slice¶
- class numba.typing.builtins.ToComplex128(context)¶
Bases: numba.typing.builtins.Caster
- key = complex128¶
- class numba.typing.builtins.ToComplex64(context)¶
Bases: numba.typing.builtins.Caster
- key = complex64¶
- class numba.typing.builtins.ToFloat32(context)¶
Bases: numba.typing.builtins.Caster
- key = float32¶
- class numba.typing.builtins.ToFloat64(context)¶
Bases: numba.typing.builtins.Caster
- key = float64¶
- class numba.typing.builtins.ToInt16(context)¶
Bases: numba.typing.builtins.Caster
- key = int16¶
- class numba.typing.builtins.ToInt32(context)¶
Bases: numba.typing.builtins.Caster
- key = int32¶
- class numba.typing.builtins.ToInt64(context)¶
Bases: numba.typing.builtins.Caster
- key = int64¶
- class numba.typing.builtins.ToInt8(context)¶
Bases: numba.typing.builtins.Caster
- key = int8¶
- class numba.typing.builtins.ToUint16(context)¶
Bases: numba.typing.builtins.Caster
- key = uint16¶
- class numba.typing.builtins.ToUint32(context)¶
Bases: numba.typing.builtins.Caster
- key = uint32¶
- class numba.typing.builtins.ToUint64(context)¶
Bases: numba.typing.builtins.Caster
- key = uint64¶
- class numba.typing.builtins.ToUint8(context)¶
Bases: numba.typing.builtins.Caster
- key = uint8¶
- class numba.typing.builtins.UnaryNegate(context)¶
Bases: numba.typing.builtins.UnaryOp
- cases = [(int8,) -> int64, (int16,) -> int64, (int32,) -> int64, (int64,) -> int64, (uint8,) -> uint64, (uint16,) -> uint64, (uint32,) -> uint64, (uint64,) -> uint64, (float32,) -> float32, (float64,) -> float64, (complex64,) -> complex64, (complex128,) -> complex128]¶
- key = '-'¶
- op = complex128¶
- class numba.typing.builtins.UnaryNot(context)¶
Bases: numba.typing.builtins.UnaryOp
- cases = [(bool,) -> bool, (int8,) -> bool, (int16,) -> bool, (int32,) -> bool, (int64,) -> bool, (uint8,) -> bool, (uint16,) -> bool, (uint32,) -> bool, (uint64,) -> bool, (float32,) -> bool, (float64,) -> bool, (complex64,) -> bool, (complex128,) -> bool]¶
- key = 'not'¶
- op = complex128¶
- class numba.typing.builtins.UnaryOp(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8,) -> int8, (int16,) -> int16, (int32,) -> int32, (int64,) -> int64, (uint8,) -> uint8, (uint16,) -> uint16, (uint32,) -> uint32, (uint64,) -> uint64, (float32,) -> float32, (float64,) -> float64, (complex64,) -> complex64, (complex128,) -> complex128]¶
- op = complex128¶
- class numba.typing.builtins.UnaryPositive(context)¶
Bases: numba.typing.builtins.UnaryOp
- cases = [(int8,) -> int64, (int16,) -> int64, (int32,) -> int64, (int64,) -> int64, (uint8,) -> uint64, (uint16,) -> uint64, (uint32,) -> uint64, (uint64,) -> uint64, (float32,) -> float32, (float64,) -> float64, (complex64,) -> complex64, (complex128,) -> complex128]¶
- key = '+'¶
- class numba.typing.builtins.UnorderedCmpOp(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(bool, bool) -> bool, (int8, int8) -> bool, (int16, int16) -> bool, (int32, int32) -> bool, (int64, int64) -> bool, (uint8, uint8) -> bool, (uint16, uint16) -> bool, (uint32, uint32) -> bool, (uint64, uint64) -> bool, (float32, float32) -> bool, (float64, float64) -> bool, (complex64, complex64) -> bool, (complex128, complex128) -> bool]¶
- op = complex128¶
- class numba.typing.builtins.Zip(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key()¶
zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]
Return a list of tuples, where each tuple contains the i-th element from each of the argument sequences. The returned list is truncated in length to the length of the shortest argument sequence.
- numba.typing.builtins.normalize_index(index)¶
- numba.typing.builtins.register_complex_attributes(ty)¶
numba.typing.cffi_utils module¶
Support for CFFI. Allows checking whether objects are CFFI functions and obtaining the pointer and numba signature.
- class numba.typing.cffi_utils.ExternCFunction(symbol, cstring)¶
Bases: numba.types.Function
- numba.typing.cffi_utils.get_pointer(cffi_func)¶
Get a pointer to the underlying function for a CFFI function as an integer.
- numba.typing.cffi_utils.is_cffi_func(obj)¶
Check whether the obj is a CFFI function
- numba.typing.cffi_utils.make_function_type(cffi_func)¶
- numba.typing.cffi_utils.map_type(cffi_type)¶
Map CFFI type to numba type
numba.typing.cmathdecl module¶
- class numba.typing.cmathdecl.CMath_predicate(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(complex64,) -> bool, (complex128,) -> bool]¶
- tp = complex128¶
- class numba.typing.cmathdecl.CMath_unary(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(complex64,) -> complex64, (complex128,) -> complex128]¶
- tp = complex128¶
- class numba.typing.cmathdecl.Cmath_log(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(complex64,) -> complex64, (complex128,) -> complex128, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- tp = complex128¶
- class numba.typing.cmathdecl.Cmath_phase(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(complex128,) -> float64, (complex64,) -> float32]¶
- tp = float64¶
- class numba.typing.cmathdecl.Cmath_polar(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.cmathdecl.Cmath_rect(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(float64, float64) -> complex128, (float32, float32) -> complex64]¶
- tp = float64¶
numba.typing.context module¶
- class numba.typing.context.BaseContext¶
Bases: object
A typing context for storing function typing constrain template.
- extend_user_function(fn, ft)¶
Insert of extend a user function.
- fn:
object used as callee
- ft:
function template
- get_global_type(gv)¶
- get_number_type(num)¶
- init()¶
- insert_attributes(at)¶
- insert_class(cls, attrs)¶
- insert_function(ft)¶
- insert_global(gv, gty)¶
- insert_overloaded(overloaded)¶
- insert_user_function(fn, ft)¶
Insert a user function.
- fn:
object used as callee
- ft:
function template
- install(registry)¶
- resolve_argument_type(val)¶
Return the numba type of a Python value that is being used as a function argument. Integer types will all be considered int64, regardless of size. Numpy arrays will be accepted in “C” or “F” layout.
Unknown types will be mapped to pyobject.
- resolve_data_type(val)¶
Return the numba type of a Python value representing data (e.g. a number or an array, but not more sophisticated types
such as functions, etc.)This function can return None to if it cannot decide.
- resolve_function_type(func, args, kws)¶
- resolve_getattr(value, attr)¶
- resolve_module_constants(typ, attr)¶
Resolve module-level global constants Return None or the attribute type
- resolve_setattr(target, attr, value)¶
- resolve_setitem(target, index, value)¶
- resolve_value_type(val)¶
Return the numba type of a Python value Return None if fail to type.
- type_compatibility(fromty, toty)¶
Returns None or a string describing the conversion e.g. exact, promote, unsafe, safe, tuple-coerce
- unify_pairs(first, second)¶
Choose PyObject type as the abstract if we fail to determine a concrete type.
- unify_types(*typelist)¶
- class numba.typing.context.Context¶
Bases: numba.typing.context.BaseContext
- init()¶
- numba.typing.context.new_method(fn, sig)¶
numba.typing.ctypes_utils module¶
This file fixes portability issues for ctypes
- numba.typing.ctypes_utils.convert_ctypes(ctypeobj)¶
- numba.typing.ctypes_utils.is_ctypes_funcptr(obj)¶
- numba.typing.ctypes_utils.make_function_type(cfnptr)¶
numba.typing.mathdecl module¶
- class numba.typing.mathdecl.Math_atan2(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int64, int64) -> float64, (uint64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64]¶
- class numba.typing.mathdecl.Math_converter(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int64,) -> int64, (int64,) -> int64, (uint64,) -> uint64, (float32,) -> int64, (float64,) -> int64]¶
- class numba.typing.mathdecl.Math_copysign(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(float32, float32) -> float32, (float64, float64) -> float64]¶
- class numba.typing.mathdecl.Math_expm1(context)¶
- class numba.typing.mathdecl.Math_floor_ceil(context)¶
- class numba.typing.mathdecl.Math_hypot(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int64, int64) -> float64, (uint64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64]¶
- class numba.typing.mathdecl.Math_pow(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(float64, int64) -> float64, (float64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64]¶
- class numba.typing.mathdecl.Math_predicate(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int64,) -> bool, (uint64,) -> bool, (float32,) -> bool, (float64,) -> bool]¶
- class numba.typing.mathdecl.Math_unary(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int64,) -> float64, (uint64,) -> float64, (float32,) -> float32, (float64,) -> float64]¶
numba.typing.npdatetime module¶
Typing declarations for numpy.timedelta64.
- class numba.typing.npdatetime.DatetimeCmpEq(context)¶
Bases: numba.typing.npdatetime.DatetimeCmpOp
- key = '=='¶
- class numba.typing.npdatetime.DatetimeCmpGE(context)¶
Bases: numba.typing.npdatetime.DatetimeCmpOp
- key = '>='¶
- class numba.typing.npdatetime.DatetimeCmpGt(context)¶
Bases: numba.typing.npdatetime.DatetimeCmpOp
- key = '>'¶
- class numba.typing.npdatetime.DatetimeCmpLE(context)¶
Bases: numba.typing.npdatetime.DatetimeCmpOp
- key = '<='¶
- class numba.typing.npdatetime.DatetimeCmpLt(context)¶
Bases: numba.typing.npdatetime.DatetimeCmpOp
- key = '<'¶
- class numba.typing.npdatetime.DatetimeCmpNe(context)¶
Bases: numba.typing.npdatetime.DatetimeCmpOp
- key = '!='¶
- class numba.typing.npdatetime.DatetimeCmpOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.npdatetime.DatetimeMinusDatetime(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = '-'¶
- class numba.typing.npdatetime.DatetimeMinusTimedelta(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = '-'¶
- class numba.typing.npdatetime.DatetimePlusTimedelta(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- key = '+'¶
- class numba.typing.npdatetime.TimedeltaAbs(context)¶
Bases: numba.typing.npdatetime.TimedeltaUnaryOp
- key = abs¶
- class numba.typing.npdatetime.TimedeltaBinAdd(context)¶
Bases: numba.typing.npdatetime.TimedeltaBinOp
- key = '+'¶
- class numba.typing.npdatetime.TimedeltaBinMult(context)¶
Bases: numba.typing.npdatetime.TimedeltaMixOp
- key = '*'¶
- class numba.typing.npdatetime.TimedeltaBinOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.npdatetime.TimedeltaBinSub(context)¶
Bases: numba.typing.npdatetime.TimedeltaBinOp
- key = '-'¶
- class numba.typing.npdatetime.TimedeltaCmpEq(context)¶
Bases: numba.typing.npdatetime.TimedeltaCmpOp
- key = '=='¶
- class numba.typing.npdatetime.TimedeltaCmpGE(context)¶
Bases: numba.typing.npdatetime.TimedeltaOrderedCmpOp
- key = '>='¶
- class numba.typing.npdatetime.TimedeltaCmpGt(context)¶
Bases: numba.typing.npdatetime.TimedeltaOrderedCmpOp
- key = '>'¶
- class numba.typing.npdatetime.TimedeltaCmpLE(context)¶
Bases: numba.typing.npdatetime.TimedeltaOrderedCmpOp
- key = '<='¶
- class numba.typing.npdatetime.TimedeltaCmpLt(context)¶
Bases: numba.typing.npdatetime.TimedeltaOrderedCmpOp
- key = '<'¶
- class numba.typing.npdatetime.TimedeltaCmpNe(context)¶
Bases: numba.typing.npdatetime.TimedeltaCmpOp
- key = '!='¶
- class numba.typing.npdatetime.TimedeltaCmpOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.npdatetime.TimedeltaDivOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
(timedelta64, {int, float}) -> timedelta64 (timedelta64, timedelta64) -> float
- class numba.typing.npdatetime.TimedeltaFloorDiv(context)¶
Bases: numba.typing.npdatetime.TimedeltaDivOp
- key = '//'¶
- class numba.typing.npdatetime.TimedeltaLegacyDiv(context)¶
Bases: numba.typing.npdatetime.TimedeltaDivOp
- key = '/?'¶
- class numba.typing.npdatetime.TimedeltaMixOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
(timedelta64, {int, float}) -> timedelta64 ({int, float}, timedelta64) -> timedelta64
- class numba.typing.npdatetime.TimedeltaOrderedCmpOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.npdatetime.TimedeltaTrueDiv(context)¶
Bases: numba.typing.npdatetime.TimedeltaDivOp
- key = '/'¶
- class numba.typing.npdatetime.TimedeltaUnaryNeg(context)¶
Bases: numba.typing.npdatetime.TimedeltaUnaryOp
- key = '-'¶
- class numba.typing.npdatetime.TimedeltaUnaryOp(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.npdatetime.TimedeltaUnaryPos(context)¶
Bases: numba.typing.npdatetime.TimedeltaUnaryOp
- key = '+'¶
numba.typing.npydecl module¶
- class numba.typing.npydecl.NumpyModuleAttribute(context)¶
Bases: numba.typing.templates.AttributeTemplate
- key = Module(<module 'numpy' from '/Users/stan/anaconda/envs/numba_dev/lib/python2.7/site-packages/numpy/__init__.pyc'>)¶
- resolve_abs(s, m)¶
- resolve_absolute(s, m)¶
- resolve_add(s, m)¶
- resolve_arccos(s, m)¶
- resolve_arccosh(s, m)¶
- resolve_arcsin(s, m)¶
- resolve_arcsinh(s, m)¶
- resolve_arctan(s, m)¶
- resolve_arctan2(s, m)¶
- resolve_arctanh(s, m)¶
- resolve_bitwise_and(s, m)¶
- resolve_bitwise_not(s, m)¶
- resolve_bitwise_or(s, m)¶
- resolve_bitwise_xor(s, m)¶
- resolve_ceil(s, m)¶
- resolve_conjugate(s, m)¶
- resolve_copysign(s, m)¶
- resolve_cos(s, m)¶
- resolve_cosh(s, m)¶
- resolve_deg2rad(s, m)¶
- resolve_degrees(s, m)¶
- resolve_divide(s, m)¶
- resolve_equal(s, m)¶
- resolve_exp(s, m)¶
- resolve_exp2(s, m)¶
- resolve_expm1(s, m)¶
- resolve_fabs(s, m)¶
- resolve_floor(s, m)¶
- resolve_floor_divide(s, m)¶
- resolve_fmax(s, m)¶
- resolve_fmin(s, m)¶
- resolve_fmod(s, m)¶
- resolve_frexp(s, m)¶
- resolve_greater(s, m)¶
- resolve_greater_equal(s, m)¶
- resolve_hypot(s, m)¶
- resolve_invert(s, m)¶
- resolve_isfinite(s, m)¶
- resolve_isinf(s, m)¶
- resolve_isnan(s, m)¶
- resolve_ldexp(s, m)¶
- resolve_left_shift(s, m)¶
- resolve_less(s, m)¶
- resolve_less_equal(s, m)¶
- resolve_log(s, m)¶
- resolve_log10(s, m)¶
- resolve_log1p(s, m)¶
- resolve_log2(s, m)¶
- resolve_logaddexp(s, m)¶
- resolve_logaddexp2(s, m)¶
- resolve_logical_and(s, m)¶
- resolve_logical_not(s, m)¶
- resolve_logical_or(s, m)¶
- resolve_logical_xor(s, m)¶
- resolve_maximum(s, m)¶
- resolve_minimum(s, m)¶
- resolve_mod(s, m)¶
- resolve_modf(s, m)¶
- resolve_multiply(s, m)¶
- resolve_negative(s, m)¶
- resolve_nextafter(s, m)¶
- resolve_not_equal(s, m)¶
- resolve_power(s, m)¶
- resolve_prod(mod)¶
- resolve_rad2deg(s, m)¶
- resolve_radians(s, m)¶
- resolve_reciprocal(s, m)¶
- resolve_remainder(s, m)¶
- resolve_right_shift(s, m)¶
- resolve_rint(s, m)¶
- resolve_sign(s, m)¶
- resolve_signbit(s, m)¶
- resolve_sin(s, m)¶
- resolve_sinh(s, m)¶
- resolve_spacing(s, m)¶
- resolve_sqrt(s, m)¶
- resolve_square(s, m)¶
- resolve_subtract(s, m)¶
- resolve_sum(mod)¶
- resolve_tan(s, m)¶
- resolve_tanh(s, m)¶
- resolve_true_divide(s, m)¶
- resolve_trunc(s, m)¶
- class numba.typing.npydecl.Numpy_generic_reduction(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
- class numba.typing.npydecl.Numpy_rules_ufunc(context)¶
Bases: numba.typing.templates.AbstractTemplate
- generic(args, kws)¶
numba.typing.operatordecl module¶
- class numba.typing.operatordecl.BinaryOperator(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> int8, (int16, int16) -> int16, (int32, int32) -> int32, (int64, int64) -> int64, (uint8, uint8) -> uint8, (uint16, uint16) -> uint16, (uint32, uint32) -> uint32, (uint64, uint64) -> uint64, (float32, float32) -> float32, (float64, float64) -> float64, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- op = complex128¶
- class numba.typing.operatordecl.ComparisonOperator(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> bool, (int16, int16) -> bool, (int32, int32) -> bool, (int64, int64) -> bool, (uint8, uint8) -> bool, (uint16, uint16) -> bool, (uint32, uint32) -> bool, (uint64, uint64) -> bool, (float32, float32) -> bool, (float64, float64) -> bool, (complex64, complex64) -> bool, (complex128, complex128) -> bool]¶
- op = complex128¶
- class numba.typing.operatordecl.PowerOperator(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(float64, int8) -> float64, (float64, int16) -> float64, (float64, int32) -> float64, (float64, int64) -> float64, (float64, uint8) -> float64, (float64, uint16) -> float64, (float64, uint32) -> float64, (float64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- op = complex128¶
- class numba.typing.operatordecl.TruedivOperator(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8, int8) -> float64, (int16, int16) -> float64, (int32, int32) -> float64, (int64, int64) -> float64, (uint8, uint8) -> float64, (uint16, uint16) -> float64, (uint32, uint32) -> float64, (uint64, uint64) -> float64, (float32, float32) -> float32, (float64, float64) -> float64, (complex64, complex64) -> complex64, (complex128, complex128) -> complex128]¶
- op = complex128¶
- class numba.typing.operatordecl.TruthOperator(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8,) -> bool, (int16,) -> bool, (int32,) -> bool, (int64,) -> bool, (uint8,) -> bool, (uint16,) -> bool, (uint32,) -> bool, (uint64,) -> bool, (float32,) -> bool, (float64,) -> bool, (complex64,) -> bool, (complex128,) -> bool]¶
- op = complex128¶
- class numba.typing.operatordecl.UnaryOperator(context)¶
Bases: numba.typing.templates.ConcreteTemplate
- cases = [(int8,) -> int8, (int16,) -> int16, (int32,) -> int32, (int64,) -> int64, (uint8,) -> uint8, (uint16,) -> uint16, (uint32,) -> uint32, (uint64,) -> uint64, (float32,) -> float32, (float64,) -> float64, (complex64,) -> complex64, (complex128,) -> complex128]¶
- op = complex128¶
- numba.typing.operatordecl.op_type¶
alias of Operator_ipow
numba.typing.templates module¶
Define typing templates
- class numba.typing.templates.AbstractTemplate(context)¶
Bases: numba.typing.templates.FunctionTemplate
Defines method generic(self, args, kws) which compute a possible signature base on input types. The signature does not have to match the input types. It is compared against the input types afterwards.
- apply(args, kws)¶
- class numba.typing.templates.AttributeTemplate(context)¶
Bases: object
- generic_resolve = NotImplemented¶
- resolve(value, attr)¶
- class numba.typing.templates.ClassAttrTemplate(context, key, clsdict)¶
Bases: numba.typing.templates.AttributeTemplate
- resolve(value, attr)¶
- class numba.typing.templates.ConcreteTemplate(context)¶
Bases: numba.typing.templates.FunctionTemplate
Defines attributes “cases” as a list of signature to match against the given input types.
- apply(args, kws)¶
- class numba.typing.templates.FunctionTemplate(context)¶
Bases: object
- class numba.typing.templates.MacroTemplate¶
Bases: object
- class numba.typing.templates.Rating¶
Bases: object
- astuple()¶
Returns a tuple suitable for comparing with the worse situation start first.
- promote¶
- safe_convert¶
- unsafe_convert¶
- class numba.typing.templates.Registry¶
Bases: object
- register(item)¶
- register_attr(item)¶
- register_global(v, t)¶
- resolves_global(global_value, wrapper_type=<class 'numba.types.Function'>)¶
Decorate a FunctionTemplate subclass so that it gets registered as resolving global_value with the wrapper_type (by default a types.Function).
- Example use::
@resolves_global(math.fabs) class Math(ConcreteTemplate):
cases = [signature(types.float64, types.float64)]
- class numba.typing.templates.Signature(return_type, args, recvr)¶
Bases: object
- args¶
- is_method¶
- recvr¶
- return_type¶
- exception numba.typing.templates.UntypedAttributeError(value, attr)¶
Bases: numba.typeinfer.TypingError
- numba.typing.templates.bound_function(template_key)¶
Wrap an AttributeTemplate resolve_* method to allow it to resolve an instance method’s signature rather than a instance attribute. The wrapped method must return the resolved method’s signature according to the given self type, args, and keywords.
It is used thusly:
- class ComplexAttributes(AttributeTemplate):
@bound_function(“complex.conjugate”) def resolve_conjugate(self, ty, args, kwds):
return ty
template_key (e.g. “complex.conjugate” above) will be used by the target to look up the method’s implementation, as a regular function.
- numba.typing.templates.make_concrete_template(name, key, signatures)¶
- numba.typing.templates.resolve_ambiguous_resolution(context, cases, args)¶
Uses asymmetric resolution to find the best version
- numba.typing.templates.resolve_overload(context, key, cases, args, kws)¶
- numba.typing.templates.signature(return_type, *args, **kws)¶