This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients pitrou, rhansen, seberg, skrah
Date 2015-02-01.08:59:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20150201085927.GA3008@bytereef.org>
In-reply-to <1422757762.56.0.808707841757.issue23352@psf.upfronthosting.co.za>
Content
> Richard Hansen added the comment:
> > Cython doesn't follow the spec though (use Python 3):
> > 
> >     from _testbuffer import *
> >     cpdef foo():
> >         cdef unsigned char[:] v = bytearray(b"testing")
> >         nd = ndarray(v, getbuf=PyBUF_ND)
> >         print(nd.suboffsets)
> >         nd = ndarray(v, getbuf=PyBUF_FULL)
> >         print(nd.suboffsets)
> 
> When I compile and run the above (latest Cython from Git master), I get:
> 
>     ()
>     ()

With Cython version 0.20.1post0 I get:

>>> foo.foo()
(-1,)
(-1,)

If you get the correct output from the latest Cython, it looks like this
issue has been fixed.
History
Date User Action Args
2015-02-01 08:59:39skrahsetrecipients: + skrah, pitrou, rhansen, seberg
2015-02-01 08:59:39skrahlinkissue23352 messages
2015-02-01 08:59:39skrahcreate