[pypy-issue] Issue #2873: micronumpy buffer interface: Logic for BUF_ANY_CONTIGUOUS is incorrect (pypy/pypy)

Andreas Kloeckner issues-reply at bitbucket.org
Tue Aug 21 01:13:10 EDT 2018


New issue 2873: micronumpy buffer interface: Logic for BUF_ANY_CONTIGUOUS is incorrect
https://bitbucket.org/pypy/pypy/issues/2873/micronumpy-buffer-interface-logic-for

Andreas Kloeckner:

I believe that this check:

https://bitbucket.org/pypy/pypy/src/dafacc40cdc480567d20997469467433f44fb346/pypy/module/micronumpy/concrete.py?at=default&fileviewer=file-view-default#concrete.py-390

should read
```python
        if ((flags & space.BUF_ANY_CONTIGUOUS) == space.BUF_ANY_CONTIGUOUS and
                not (self.flags & NPY.ARRAY_F_CONTIGUOUS or
                     self.flags & NPY.ARRAY_C_CONTIGUOUS)):
```
instead of
```python
        if ((flags & space.BUF_ANY_CONTIGUOUS) == space.BUF_ANY_CONTIGUOUS and
                not (self.flags & NPY.ARRAY_F_CONTIGUOUS and
                     self.flags & NPY.ARRAY_C_CONTIGUOUS)):
```




More information about the pypy-issue mailing list