summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/memoryviews/slicing.pyx
blob: a6134aae20ea1119bd96816e18372ae564f893d5 (plain)
1
2
3
4
5
6
7
8
9
10
import numpy as np

exporting_object = np.arange(0, 15 * 10 * 20, dtype=np.intc).reshape((15, 10, 20))

cdef int[:, :, :] my_view = exporting_object

# These are all equivalent
my_view[10]
my_view[10, :, :]
my_view[10, ...]