Blame tests/memoryview/compile_declarations.pyx

Packit Service 99d393
# mode: compile
Packit Service 99d393
Packit Service 99d393
cimport cython
Packit Service 99d393
# from cython.view cimport contig as foo, full as bar #, follow
Packit Service 99d393
from cython cimport view
Packit Service 99d393
from cython.view cimport (generic, strided, indirect,
Packit Service 99d393
                          contiguous, indirect_contiguous)
Packit Service 99d393
Packit Service 99d393
cdef char[:] one_dim
Packit Service 99d393
cdef char[:,:,:] three_dim
Packit Service 99d393
cdef unsigned int[::1, :] view1
Packit Service 99d393
cdef unsigned int[:, ::1] view2
Packit Service 99d393
cdef long long[::1, :, :, :] fort_contig
Packit Service 99d393
cdef unsigned long[:, :, :, ::1] c_contig
Packit Service 99d393
cdef unsigned short int[::1] c_and_fort
Packit Service 99d393
cdef unsigned long[:, :, :, ::0x0001] c_contig0
Packit Service 99d393
Packit Service 99d393
cdef int[::generic, ::generic] a1
Packit Service 99d393
cdef int[::strided, ::generic] a2
Packit Service 99d393
cdef int[::indirect, ::generic] a3
Packit Service 99d393
cdef int[::generic, ::strided] a4
Packit Service 99d393
cdef int[::strided, ::strided] a5
Packit Service 99d393
cdef int[::indirect, ::strided] a6
Packit Service 99d393
cdef int[::generic, ::indirect] a7
Packit Service 99d393
cdef int[::strided, ::indirect] a8
Packit Service 99d393
cdef int[::indirect, ::indirect] a9
Packit Service 99d393
Packit Service 99d393
cdef int[::generic, ::contiguous] a13
Packit Service 99d393
cdef int[::strided, ::contiguous] a14
Packit Service 99d393
cdef int[::indirect, ::contiguous] a15
Packit Service 99d393
cdef int[::generic, ::indirect_contiguous] a16
Packit Service 99d393
cdef int[::strided, ::indirect_contiguous] a17
Packit Service 99d393
cdef int[::indirect, ::indirect_contiguous] a18
Packit Service 99d393
Packit Service 99d393
cdef int[::generic, ::] a19
Packit Service 99d393
cdef int[::strided, :] a20
Packit Service 99d393
cdef int[::indirect, :] a21
Packit Service 99d393
cdef int[::contiguous, :] a23
Packit Service 99d393
cdef int[::indirect_contiguous, :] a24
Packit Service 99d393
Packit Service 99d393
cdef int[::indirect_contiguous, ::1] a25
Packit Service 99d393
cdef int[::indirect_contiguous, ::1, :] a26
Packit Service 99d393
cdef int[::indirect_contiguous, :, ::1] a27
Packit Service 99d393
cdef int[::indirect_contiguous, ::1, :] a28
Packit Service 99d393
cdef int[::indirect_contiguous, ::view.contiguous, :] a29
Packit Service 99d393
cdef int[::indirect_contiguous, :, ::view.contiguous] a30
Packit Service 99d393
Packit Service 99d393
cdef int[::indirect, ::1] a31
Packit Service 99d393
cdef int[::indirect, ::1, :] a32 = object()
Packit Service 99d393
cdef int[::indirect, :, ::1] a33 = object()
Packit Service 99d393
cdef int[::indirect, ::1, :] a34
Packit Service 99d393
cdef int[::indirect, ::view.contiguous, :] a35
Packit Service 99d393
cdef int[::indirect, :, ::view.contiguous] a36
Packit Service 99d393
Packit Service 99d393
cdef int[::1, :] my_f_contig = a32[0]
Packit Service 99d393
cdef int[:, ::1] my_c_contig = a33[0]
Packit Service 99d393
Packit Service 99d393
my_f_contig = a32[0, :, :]
Packit Service 99d393
my_c_contig = a33[0, :, :]
Packit Service 99d393
Packit Service 99d393
my_f_contig = a32[0, ...]
Packit Service 99d393
my_c_contig = a33[0, ...]
Packit Service 99d393
Packit Service 99d393
# Test casting to cython.view.array
Packit Service 99d393
cdef double[:, :] m1 = <double[:10, :10]> NULL
Packit Service 99d393
cdef double[:, :] m2 = <double[:10, :10:1]> NULL
Packit Service 99d393
cdef double[:, :] m3 = <double[:10:1, :10]> NULL
Packit Service 99d393
Packit Service 99d393
cdef double[:, :, :] m4 = <double[:10, :10, :10]> NULL
Packit Service 99d393
cdef double[:, :, :] m5 = <double[:10, :10, :10:1]> NULL
Packit Service 99d393
cdef double[:, :, :] m6 = <double[:10:1, :10, :10]> NULL