Simplify by avoiding special strides case
numpy.ravel is already doing the optimization to not copy the data
if the source array is already contiguous.
@@ -1323,9 +1323,6 @@ cdef class ndarray:
if (self.dtype == value.dtype
and self.shape == value.shape
and (self.flags.f_contiguous or self.flags.c_contiguous)):
- if self.strides == value.strides:
- ptr = ctypes.c_void_p(value.__array_interface__['data'][0])
- else:
order = 'F' if self.flags.f_contiguous else 'C'
tmp = value.ravel(order)
ptr = ctypes.c_void_p(tmp.__array_interface__['data'][0])
