The error is that the shape field of the memory view is a C array that cannot be converted to a Python object in order to compare it to the shape of the buffer, which is a Python tuple.
The underlying problem is that Cython does not know that the shape field of a buffer is just a C array as well. Instead, it looks it up as a Python attribute and unpacks it as a Python tuple.
This code fails to compile for me:
The error is that the shape field of the memory view is a C array that cannot be converted to a Python object in order to compare it to the shape of the buffer, which is a Python tuple.
The underlying problem is that Cython does not know that the shape field of a buffer is just a C array as well. Instead, it looks it up as a Python attribute and unpacks it as a Python tuple.
Migrated from http://trac.cython.org/ticket/780