Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: add container types documentation (#3349)
  • Loading branch information
coderay3000 committed Aug 12, 2026
commit 630093231cc96610c16dedfebd4ab85ed1fba5d9
28 changes: 28 additions & 0 deletions docs/source/reference/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,34 @@ e.g. declaring the type of a :ref:`typed.List <feature-typed-list>`.::
Note that this feature is only supported for simple numerical types. Application
to compound types, e.g. record types, is not supported.

Containers
----------

Numba supports strongly-typed containers that can be passed to or returned
from JIT-compiled functions, or used within :ref:`numba.objmode <objmode>`.

.. class:: numba.types.ListType(item_type)

Represents a typed list containing elements of *item_type*.
Created implicitly when using :ref:`numba.typed.List <feature-typed-list>`.

::

>>> from numba import types, typed
>>> list_type = types.ListType(types.float64)
>>> typed.List.empty_list(types.float64)

.. class:: numba.types.DictType(key_type, value_type)

Represents a typed dictionary with keys of *key_type* and values of *value_type*.
Created implicitly when using :ref:`numba.typed.Dict <feature-typed-dict>`.

::

>>> from numba import types, typed
>>> dict_type = types.DictType(types.unicode_type, types.int64)
>>> typed.Dict.empty_dict(types.unicode_type, types.int64)

Functions
---------

Expand Down
Loading