[MRG] FIX: Force `w` to be a contiguous vector
@@ -141,7 +141,7 @@ cdef extern from "cblas.h":
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
-def enet_coordinate_descent(np.ndarray[floating, ndim=1] w,
+def enet_coordinate_descent(np.ndarray[floating, ndim=1, mode='c'] w,
floating alpha, floating beta,
np.ndarray[floating, ndim=2, mode='fortran'] X,
np.ndarray[floating, ndim=1, mode='c'] y,
@@ -308,7 +308,7 @@ def enet_coordinate_descent(np.ndarray[floating, ndim=1] w,
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
-def sparse_enet_coordinate_descent(floating [:] w,
+def sparse_enet_coordinate_descent(floating [::1] w,
floating alpha, floating beta,
np.ndarray[floating, ndim=1, mode='c'] X_data,
np.ndarray[int, ndim=1, mode='c'] X_indices,
@@ -528,7 +528,8 @@ def sparse_enet_coordinate_descent(floating [:] w,
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
-def enet_coordinate_descent_gram(floating[:] w, floating alpha, floating beta,
+def enet_coordinate_descent_gram(floating[::1] w,
+ floating alpha, floating beta,
np.ndarray[floating, ndim=2, mode='c'] Q,
np.ndarray[floating, ndim=1, mode='c'] q,
np.ndarray[floating, ndim=1] y,
