Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time



This page describes the overall philosophy behind :obj:`unumpy`. If you are interested in a general dispatch mechanism, see :obj:`uarray`.

:obj:`unumpy` builds on top of :obj:`uarray`. It is an effort to specify the core NumPy API, and provide backends for the API.

What's new in unumpy?

:obj:`unumpy` is the first approach to leverage :obj:`uarray` in order to build a generic backend system for (what we hope will be) the core NumPy API specification. It's possible to create the backend object, and use that to perform operations. In addition, it's possible to change the used backend via a context manager.

Relation to the NumPy duck-array ecosystem

There are three main NumPy enhancement proposals (NEPs) inside NumPy itself that relate to the duck-array ecosystem. There is NEP-22, which is a high-level overview of the duck-array ecosystem, and the direction NumPy intends to move towards. Two main protocols were introduced to fill this gap, the __array_function__ protocol defined in NEP-18, and the older __array_ufunc__ protocol defined in NEP-13.

:obj:`unumpy` provides an an alternate framework based on :obj:`uarray`, bypassing the __array_function__ and __array_ufunc__ protocols entirely. It provides a clear separation of concerns. It defines callables which can be overridden, and expresses everything else in terms of these callables. See the :obj:`uarray` documentation for more details.

.. toctree::
    :maxdepth: 3


Indices and tables