@@ -775,24 +775,28 @@ cdef class LocalBuffer:
775775 dt = numpy.dtype(' f4' )
776776 cdef numpy.intp_t alloc_local = 2 * self .partition.alloc_local
777777 cdef numpy.intp_t strides = dt.itemsize
778+ # Replaces NPY_BEHAVED
779+ cdef arrflags = numpy.NPY_ARRAY_C_CONTIGUOUS | numpy.NPY_ARRAY_ALIGNED | numpy.NPY_ARRAY_WRITEABLE | numpy.NPY_ARRAY_NOTSWAPPED
778780 cdef numpy.ndarray a = numpy.PyArray_New(type ,
779781 1 ,
780782 < numpy.intp_t* > & alloc_local,
781783 dt.type_num,
782784 < numpy.intp_t* > & strides,
783- self .ptr, dt.itemsize, numpy.NPY_BEHAVED , None )
785+ self .ptr, dt.itemsize, arrflags , None )
784786
785787 numpy.set_array_base(a, self )
786788 return a
787789
788790 def view_input (self , type = numpy.ndarray):
789791 cdef numpy.dtype dt = self .partition.i_dtype
792+ # Replaces NPY_BEHAVED
793+ cdef arrflags = numpy.NPY_ARRAY_C_CONTIGUOUS | numpy.NPY_ARRAY_ALIGNED | numpy.NPY_ARRAY_WRITEABLE | numpy.NPY_ARRAY_NOTSWAPPED
790794 cdef numpy.ndarray a = numpy.PyArray_New(type ,
791795 self .partition.ndim,
792796 < numpy.intp_t* > self .partition.local_i_shape.data,
793797 dt.type_num,
794798 < numpy.intp_t* > self .partition.local_i_strides.data,
795- self .ptr, dt.itemsize, numpy.NPY_BEHAVED , None )
799+ self .ptr, dt.itemsize, arrflags , None )
796800
797801 numpy.set_array_base(a, self )
798802
@@ -806,7 +810,7 @@ cdef class LocalBuffer:
806810 < numpy.intp_t* > self .partition.local_o_shape.data,
807811 dt.type_num, < numpy.intp_t* >
808812 self .partition.local_o_strides.data,
809- self .ptr, dt.itemsize, numpy.NPY_BEHAVED , None )
813+ self .ptr, dt.itemsize, arrflags , None )
810814
811815 numpy.set_array_base(a, self )
812816
0 commit comments