[Numpy-discussion] Open CV 3.0 + NPY_RELAXED_STRIDES

Nathaniel Smith njs at pobox.com
Wed Jun 10 21:21:05 EDT 2015

On Wed, Jun 10, 2015 at 5:53 PM, Jaime Fernández del Río
<jaime.frio at gmail.com> wrote:
> I'm in the midst of a Python 3.5 + MSVS 2015 compilation frenzy. Today it
> was time for Open CV 3.0, where I found a nasty bug that I have eventually
> tracked down to using a development version of NumPy, and Open CV 3.0
> choking on relaxed strides, as it does a check that every stride is a
> multiple of the itemsize.
> I was thinking of submitting a patch to opencv to fix this, but was
> wondering whether we have plans to eventually have relaxed strides out in
> the wild in user releases, or is it just a testing tool for development?

The ultimate goal is certainly to get it out into the wild, as not
having relaxed strides creates other weird bugs instead. (Mostly
spurious copies because of arrays being considered discontiguous when
they actually were contiguous all along, but also fun stuff like tiny
irrelevant changes in numpy breaking people's code because they are
expecting an array with F contiguity and numpy has started describing
the output array as C contiguity, when in fact it is both and the bug
is entirely in the arbitrary assignment of these flags.)


Nathaniel J. Smith -- http://vorpus.org

More information about the NumPy-Discussion mailing list