when using skimage I get the following error:
win = skimage.util.view_as_windows(x, windowSize, windowShift)
C:\Program Files\Anaconda2\lib\site-packages\skimage\util\shape.py:247: RuntimeWarning: Cannot provide views on a non-contiguous input array without copying.
warn(RuntimeWarning("Cannot provide views on a non-contiguous input "
as far I understood this is because x is a non contiguous array.
I think I solved the problem adding in my code np.ascontiguousarray
as below:
win = skimage.util.view_as_windows(np.ascontiguousarray(x), windowSize, windowShift)
Is this the right thing to do? Note: I do it all the time I call this function from skimage...does it have any particular implication?