Commit fd8e8cbe authored by da-woods's avatar da-woods Committed by GitHub

docs: limitations of np.ndarray (GH-4230)

People often have unrealistic expectations about what this typing helps with, so I've added a small paragraph to try to make it clearer.
parent 47e2c769
......@@ -170,6 +170,16 @@ function call.)
The actual rules are a bit more complicated but the main message is clear:
Do not use typed objects without knowing that they are not set to None.
What typing does not do
=======================
The main purpose of typing things as :obj:`ndarray` is to allow efficient
indexing of single elements, and to speed up access to a small number of
attributes such as ``.shape``. Typing does not allow Cython to speed
up mathematical operations on the whole array (for example, adding two arrays
together). Typing does not allow Cython to speed up calls to Numpy global
functions or to methods of the array.
More generic code
==================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment