I am currently using view_as_blocks to extract sub matrices from a bigger matrices, these submatrices has to non-overlapping. but i am getting this error: /usr/local/lib/python2.7/dist-packages/skimage/util/shape.py:94: RuntimeWarning: Cannot provide views on a non-contiguous input array without copying. warn(RuntimeWarning("Cannot provide views on a non-contiguous input " Something i should be worried about?
Hi Carlton On Wed, Mar 15, 2017, at 09:05, Carlton Banks wrote:
but i am getting this error:
/usr/local/lib/python2.7/dist-packages/skimage/util/shape.py:94: RuntimeWarning: Cannot provide views on a non-contiguous input array without copying. warn(RuntimeWarning("Cannot provide views on a non- contiguous input "
Something i should be worried about?
If you start with a contiguous array (roughly speaking, where all values are stored in a single block of memory), view_as_blocks can provide a new "view" on the array without making any copies of the underlying data: it does this by manipulating the array strides. This is not always possible, so while it will still create the structure you seek, it makes a copy underneath the hood. We warn users about this, because it may be slow, and it may impact memory use. Best regards Stéfan
participants (2)
-
Carlton Banks
-
Stefan van der Walt