Type inferer for typed containers, register with numba.register_inferer().
Parameters: |
|
---|
>>> 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(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)