Message235148
> 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. |
|
Date |
User |
Action |
Args |
2015-02-01 08:59:39 | skrah | set | recipients:
+ skrah, pitrou, rhansen, seberg |
2015-02-01 08:59:39 | skrah | link | issue23352 messages |
2015-02-01 08:59:39 | skrah | create | |
|