Return a contiguous array in memory (C order).
Parameters : | a : array_like
dtype : str or dtype object, optional
|
---|---|
Returns : | out : ndarray
|
See also
Examples
>>> x = np.arange(6).reshape(2,3)
>>> np.ascontiguousarray(x, dtype=np.float32)
array([[ 0., 1., 2.],
[ 3., 4., 5.]], dtype=float32)
>>> x.flags['C_CONTIGUOUS']
True