Commit 1dd339cb authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Moved the transpose code snippet to the examples directory.

parent 084a25f5
import numpy as np
array = np.arange(20, dtype=np.intc).reshape((2, 10))
cdef int[:, ::1] c_contig = array
cdef int[::1, :] f_contig = c_contig.T
......@@ -146,10 +146,9 @@ Transposing
-----------
In most cases (see below), the memoryview can be transposed in the same way that
NumPy slices can be transposed::
NumPy slices can be transposed:
cdef int[:, ::1] c_contig = ...
cdef int[::1, :] f_contig = c_contig.T
.. literalinclude:: ../../examples/userguide/memoryviews/transpose.pyx
This gives a new, transposed, view on the data.
......
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