containers Package

containers Package

orderedcontainer Module

numba.containers.orderedcontainer.container_methods(item_type, notimplemented)
numba.containers.orderedcontainer.notimplemented(msg)
numba.containers.orderedcontainer.typedcontainer_infer(compile_typedcontainer, type_node, iterable_node)

Type inferer for typed containers, register with numba.register_inferer().

Parameters:
  • compile_typedcontainer – item_type -> typed container extension class
  • type_node – type parameter to typed container constructor
  • iterable_node – value parameter to typed container constructor (optional)

register Module

numba.containers.register.infer_tlist(type_node, iterable_node)
numba.containers.register.infer_ttuple(type_node, iterable_node)

typedlist Module

numba.containers.typedlist.compile_typedlist(item_type, _list_cache={})
numba.containers.typedlist.notimplemented(msg)
numba.containers.typedlist.typedlist(item_type, iterable=None)
>>> typedlist(int_)
[]
>>> tlist = typedlist(int_, range(10))
>>> tlist
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> tlist[5]
5L
>>> typedlist(float_, range(10))
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]

typedtuple Module

numba.containers.typedtuple.compile_typedtuple(item_type, _tuple_cache={})
numba.containers.typedtuple.notimplemented(msg)
numba.containers.typedtuple.typedtuple(item_type, iterable=None, _tuple_cache={})
>>> typedtuple(nb.int_)
()
>>> ttuple = typedtuple(nb.int_, range(10))
>>> ttuple
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
>>> ttuple[5]
5L
>>> typedtuple(nb.float_, range(10))
(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)

Subpackages