Hi, we are now down to two test failures in the NumPy memoryview test: https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/647/test... I'm going to make a "final" :) pre-release when they are fixed, so please have a look. Stefan
I fixed one of them by making char signed. The root issue seems to be that when trying to convert an object to numpy, it looks at the buffer format, and rejects plain char. The fallback code (using struct et al) is unable to cope with the nested/repeated formats. The other could be fixed similarly, if that's the direction we want to go. - Robert On Mon, Aug 20, 2012 at 11:18 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Hi,
we are now down to two test failures in the NumPy memoryview test:
https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/647/test...
I'm going to make a "final" :) pre-release when they are fixed, so please have a look.
Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Heh, so it seems if numpy doesn't understand the format string it falls back to copying the array through the sequence protocol (__getitem__ + len)? Since Cython can't convert multi-dimension C arrays to objects, the memoryview getitem will use the struct module (which really handles a subset of the things Cython handles). It cannot handle any type of struct. On 21 August 2012 11:54, Robert Bradshaw <robertwb@gmail.com> wrote:
I fixed one of them by making char signed. The root issue seems to be that when trying to convert an object to numpy, it looks at the buffer format, and rejects plain char. The fallback code (using struct et al) is unable to cope with the nested/repeated formats. The other could be fixed similarly, if that's the direction we want to go.
- Robert
On Mon, Aug 20, 2012 at 11:18 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Hi,
we are now down to two test failures in the NumPy memoryview test:
https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/647/test...
I'm going to make a "final" :) pre-release when they are fixed, so please have a look.
Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
mark florisson, 21.08.2012 13:43:
On 21 August 2012 11:54, Robert Bradshaw wrote:
On Mon, Aug 20, 2012 at 11:18 PM, Stefan Behnel wrote:
we are now down to two test failures in the NumPy memoryview test:
https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/647/test...
I fixed one of them by making char signed. The root issue seems to be that when trying to convert an object to numpy, it looks at the buffer format, and rejects plain char. The fallback code (using struct et al) is unable to cope with the nested/repeated formats. The other could be fixed similarly, if that's the direction we want to go.
Heh, so it seems if numpy doesn't understand the format string it falls back to copying the array through the sequence protocol (__getitem__ + len)? Since Cython can't convert multi-dimension C arrays to objects, the memoryview getitem will use the struct module (which really handles a subset of the things Cython handles). It cannot handle any type of struct.
Ok - anyone objecting to just fixing the tests for the release? Users will tell us early enough if their code stopped working. Stefan
On 21 August 2012 16:09, Stefan Behnel <stefan_ml@behnel.de> wrote:
mark florisson, 21.08.2012 13:43:
On 21 August 2012 11:54, Robert Bradshaw wrote:
On Mon, Aug 20, 2012 at 11:18 PM, Stefan Behnel wrote:
we are now down to two test failures in the NumPy memoryview test:
https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/647/test...
I fixed one of them by making char signed. The root issue seems to be that when trying to convert an object to numpy, it looks at the buffer format, and rejects plain char. The fallback code (using struct et al) is unable to cope with the nested/repeated formats. The other could be fixed similarly, if that's the direction we want to go.
Heh, so it seems if numpy doesn't understand the format string it falls back to copying the array through the sequence protocol (__getitem__ + len)? Since Cython can't convert multi-dimension C arrays to objects, the memoryview getitem will use the struct module (which really handles a subset of the things Cython handles). It cannot handle any type of struct.
Ok - anyone objecting to just fixing the tests for the release? Users will tell us early enough if their code stopped working.
Stefan
_______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
I think that's the right approach, considering this is not a bug on our side.
participants (3)
-
mark florisson -
Robert Bradshaw -
Stefan Behnel