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.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.Complex128Attribute(context)

Bases: numba.typing.builtins.ComplexAttribute

innertype = float64
key = complex128
class numba.typing.builtins.Complex64Attribute(context)

Bases: numba.typing.builtins.ComplexAttribute

innertype = float32
key = complex64
class numba.typing.builtins.ComplexAttribute(context)

Bases: numba.typing.templates.AttributeTemplate

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.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.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.MathModuleAttribute(context)

Bases: numba.typing.templates.AttributeTemplate

key = Module(<module 'math' from '/Users/stan/anaconda/envs/numba_dev/lib/python2.7/lib-dynload/math.so'>)
resolve_acos(mod)
resolve_acosh(mod)
resolve_asin(mod)
resolve_asinh(mod)
resolve_atan(mod)
resolve_atan2(mod)
resolve_atanh(mod)
resolve_ceil(mod)
resolve_cos(mod)
resolve_cosh(mod)
resolve_degrees(mod)
resolve_e(mod)
resolve_exp(mod)
resolve_expm1(mod)
resolve_fabs(mod)
resolve_floor(mod)
resolve_hypot(mod)
resolve_isinf(mod)
resolve_isnan(mod)
resolve_log(mod)
resolve_log10(mod)
resolve_log1p(mod)
resolve_pi(mod)
resolve_pow(mod)
resolve_radians(mod)
resolve_sin(mod)
resolve_sinh(mod)
resolve_sqrt(mod)
resolve_tan(mod)
resolve_tanh(mod)
resolve_trunc(mod)
class numba.typing.mathdecl.Math_acos(context)

Bases: numba.typing.mathdecl.Math_unary

key()

acos(x)

Return the arc cosine (measured in radians) of x.

class numba.typing.mathdecl.Math_acosh(context)

Bases: numba.typing.mathdecl.Math_unary

key()

acosh(x)

Return the hyperbolic arc cosine (measured in radians) of x.

class numba.typing.mathdecl.Math_asin(context)

Bases: numba.typing.mathdecl.Math_unary

key()

asin(x)

Return the arc sine (measured in radians) of x.

class numba.typing.mathdecl.Math_asinh(context)

Bases: numba.typing.mathdecl.Math_unary

key()

asinh(x)

Return the hyperbolic arc sine (measured in radians) of x.

class numba.typing.mathdecl.Math_atan(context)

Bases: numba.typing.mathdecl.Math_unary

key()

atan(x)

Return the arc tangent (measured in radians) of x.

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]
key()

atan2(y, x)

Return the arc tangent (measured in radians) of y/x. Unlike atan(y/x), the signs of both x and y are considered.

class numba.typing.mathdecl.Math_atanh(context)

Bases: numba.typing.mathdecl.Math_unary

key()

atanh(x)

Return the hyperbolic arc tangent (measured in radians) of x.

class numba.typing.mathdecl.Math_ceil(context)

Bases: numba.typing.mathdecl.Math_unary

key()

ceil(x)

Return the ceiling of x as a float. This is the smallest integral value >= x.

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_cos(context)

Bases: numba.typing.mathdecl.Math_unary

key()

cos(x)

Return the cosine of x (measured in radians).

class numba.typing.mathdecl.Math_cosh(context)

Bases: numba.typing.mathdecl.Math_unary

key()

cosh(x)

Return the hyperbolic cosine of x.

class numba.typing.mathdecl.Math_degrees(context)

Bases: numba.typing.mathdecl.Math_unary

key()

degrees(x)

Convert angle x from radians to degrees.

class numba.typing.mathdecl.Math_exp(context)

Bases: numba.typing.mathdecl.Math_unary

key()

exp(x)

Return e raised to the power of x.

class numba.typing.mathdecl.Math_expm1(context)

Bases: numba.typing.mathdecl.Math_unary

key()

expm1(x)

Return exp(x)-1. This function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x.

class numba.typing.mathdecl.Math_fabs(context)

Bases: numba.typing.mathdecl.Math_unary

key()

fabs(x)

Return the absolute value of the float x.

class numba.typing.mathdecl.Math_floor(context)

Bases: numba.typing.mathdecl.Math_unary

key()

floor(x)

Return the floor of x as a float. This is the largest integral value <= x.

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]
key()

hypot(x, y)

Return the Euclidean distance, sqrt(x*x + y*y).

class numba.typing.mathdecl.Math_isinf(context)

Bases: numba.typing.templates.ConcreteTemplate

cases = [(int64,) -> bool, (uint64,) -> bool, (float32,) -> bool, (float64,) -> bool]
key()

isinf(x) -> bool

Check if float x is infinite (positive or negative).

class numba.typing.mathdecl.Math_isnan(context)

Bases: numba.typing.templates.ConcreteTemplate

cases = [(int64,) -> bool, (uint64,) -> bool, (float32,) -> bool, (float64,) -> bool]
key()

isnan(x) -> bool

Check if float x is not a number (NaN).

class numba.typing.mathdecl.Math_log(context)

Bases: numba.typing.mathdecl.Math_unary

key()

log(x[, base])

Return the logarithm of x to the given base. If the base not specified, returns the natural logarithm (base e) of x.

class numba.typing.mathdecl.Math_log10(context)

Bases: numba.typing.mathdecl.Math_unary

key()

log10(x)

Return the base 10 logarithm of x.

class numba.typing.mathdecl.Math_log1p(context)

Bases: numba.typing.mathdecl.Math_unary

key()

log1p(x)

Return the natural logarithm of 1+x (base e). The result is computed in a way which is accurate for x near zero.

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]
key()

pow(x, y)

Return x**y (x to the power of y).

class numba.typing.mathdecl.Math_radians(context)

Bases: numba.typing.mathdecl.Math_unary

key()

radians(x)

Convert angle x from degrees to radians.

class numba.typing.mathdecl.Math_sin(context)

Bases: numba.typing.mathdecl.Math_unary

key()

sin(x)

Return the sine of x (measured in radians).

class numba.typing.mathdecl.Math_sinh(context)

Bases: numba.typing.mathdecl.Math_unary

key()

sinh(x)

Return the hyperbolic sine of x.

class numba.typing.mathdecl.Math_sqrt(context)

Bases: numba.typing.mathdecl.Math_unary

key()

sqrt(x)

Return the square root of x.

class numba.typing.mathdecl.Math_tan(context)

Bases: numba.typing.mathdecl.Math_unary

key()

tan(x)

Return the tangent of x (measured in radians).

class numba.typing.mathdecl.Math_tanh(context)

Bases: numba.typing.mathdecl.Math_unary

key()

tanh(x)

Return the hyperbolic tangent of x.

class numba.typing.mathdecl.Math_trunc(context)

Bases: numba.typing.mathdecl.Math_converter

key()

trunc(x:Real) -> Integral

Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method.

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_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_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.OperatorModuleAttribute(context)

Bases: numba.typing.templates.AttributeTemplate

key = Module(<module 'operator' from '/Users/stan/anaconda/envs/numba_dev/lib/python2.7/lib-dynload/operator.so'>)
resolve_add(mod)
resolve_and_(mod)
resolve_div(mod)
resolve_eq(mod)
resolve_floordiv(mod)
resolve_ge(mod)
resolve_gt(mod)
resolve_iadd(mod)
resolve_iand(mod)
resolve_idiv(mod)
resolve_ifloordiv(mod)
resolve_ilshift(mod)
resolve_imod(mod)
resolve_imul(mod)
resolve_invert(mod)
resolve_ior(mod)
resolve_ipow(mod)
resolve_irshift(mod)
resolve_isub(mod)
resolve_itruediv(mod)
resolve_ixor(mod)
resolve_le(mod)
resolve_lshift(mod)
resolve_lt(mod)
resolve_mod(mod)
resolve_mul(mod)
resolve_ne(mod)
resolve_neg(mod)
resolve_not_(mod)
resolve_or_(mod)
resolve_pos(mod)
resolve_pow(mod)
resolve_rshift(mod)
resolve_sub(mod)
resolve_truediv(mod)
resolve_xor(mod)
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.create_resolve_method(op)
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)
class numba.typing.templates.Signature(return_type, args, recvr)

Bases: object

args
is_method
recvr
return_type
exception numba.typing.templates.UnsafePromotionError

Bases: exceptions.Exception

exception numba.typing.templates.UntypedAttributeError(value, attr)

Bases: exceptions.AttributeError

numba.typing.templates.make_concrete_template(name, key, signatures)
numba.typing.templates.resolve_ambiguous_promotions(context, cases, args)
numba.typing.templates.resolve_overload(context, key, cases, args, kws)
numba.typing.templates.safe_promotion(actual, formal)

Allow integer to be casted to the nearest integer

numba.typing.templates.signature(return_type, *args, **kws)

Module contents