Re: [Cython] bug in typed memoryviews (memoryviewslice)

2015-01-29 Thread Richard Hansen
On 01/29/2015 05:14 AM, Richard Hansen wrote: > On 01/27/2015 05:38 PM, Richard Hansen wrote: >> Hi all, >> >> If I create foo.pyx with the following contents: >> >> cpdef object foo(): >> cdef unsigned char[:] s = "012345" >> return s >> >> I notice the following behavior: >> >> $ python -

Re: [Cython] bug in typed memoryviews (memoryviewslice)

2015-01-29 Thread Richard Hansen
On 01/27/2015 05:38 PM, Richard Hansen wrote: > Hi all, > > If I create foo.pyx with the following contents: > > cpdef object foo(): > cdef unsigned char[:] s = "012345" > return s > > I notice the following behavior: > > $ python -c ' > import foo > m=foo.foo() > print repr(memoryview(

[Cython] bug in typed memoryviews (memoryviewslice)

2015-01-27 Thread Richard Hansen
Hi all, If I create foo.pyx with the following contents: cpdef object foo(): cdef unsigned char[:] s = "012345" return s I notice the following behavior: $ python -c ' import foo m=foo.foo() print repr(memoryview(m.base).tobytes()) print repr(memoryview(m).tobytes()) ' '012345' '123450'