[scikit-image] Warning from view_as_blocks
Stefan van der Walt
stefanv at berkeley.edu
Wed Mar 15 12:59:42 EDT 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20170315/d886824a/attachment.html>
More information about the scikit-image
mailing list