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