Commit eee370b0 authored by Mark Florisson's avatar Mark Florisson

Disallow pointer dtypes in memoryview slices

parent 1165829f
...@@ -171,7 +171,6 @@ def valid_memslice_dtype(dtype): ...@@ -171,7 +171,6 @@ def valid_memslice_dtype(dtype):
return ( return (
dtype.is_error or dtype.is_error or
dtype.is_ptr or
dtype.is_numeric or dtype.is_numeric or
dtype.is_struct or dtype.is_struct or
dtype.is_pyobject or dtype.is_pyobject or
......
...@@ -40,6 +40,9 @@ cdef int[:, ::view.contiguous, ::view.indirect_contiguous] a6 ...@@ -40,6 +40,9 @@ cdef int[:, ::view.contiguous, ::view.indirect_contiguous] a6
#cdef int[::view.generic_contiguous, ::view.contiguous] a7 #cdef int[::view.generic_contiguous, ::view.contiguous] a7
#cdef int[::view.contiguous, ::view.generic_contiguous] a8 #cdef int[::view.contiguous, ::view.generic_contiguous] a8
ctypedef int *intp
cdef intp[:, :] myarray
# These are VALID # These are VALID
cdef int[::view.indirect_contiguous, ::view.contiguous] a9 cdef int[::view.indirect_contiguous, ::view.contiguous] a9
...@@ -61,4 +64,5 @@ _ERRORS = u''' ...@@ -61,4 +64,5 @@ _ERRORS = u'''
31:9: Dimension may not be contiguous 31:9: Dimension may not be contiguous
37:9: Only one direct contiguous axis may be specified. 37:9: Only one direct contiguous axis may be specified.
38:9:Only dimensions 3 and 2 may be contiguous and direct 38:9:Only dimensions 3 and 2 may be contiguous and direct
44:10: Invalid base type for memoryview slice
''' '''
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