Commit 59c083a1 authored by Mark Florisson's avatar Mark Florisson

Make is_c/f_contig return a bool

parent 00cf5cd5
......@@ -572,7 +572,7 @@ class MemoryViewSliceType(PyrexType):
MemoryView.get_is_contig_func_name(c_or_f, self.ndim)
cfunctype = CFuncType(
return_type=c_int_type,
return_type=c_bint_type,
args=[CFuncTypeArg("memviewslice", self, None)],
exception_value="-1",
)
......
......@@ -166,7 +166,7 @@ def test_array_from_pointer_3d():
>>> test_array_from_pointer_3d()
getp()
3 3
1 1
True True
"""
cdef int *p = getp(2, 2, 2)
cdef array c_arr = <int[:2, :2, :2:1]> p
......
......@@ -174,13 +174,13 @@ def test_copy_mismatch():
def test_is_contiguous():
u'''
>>> test_is_contiguous()
1 1
0 1
1 0
1 0
True True
False True
True False
True False
<BLANKLINE>
0 1
1 0
False True
True False
'''
cdef int[::1, :, :] fort_contig = array((1,1,1), sizeof(int), 'i', mode='fortran')
print fort_contig.is_c_contig() , fort_contig.is_f_contig()
......
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