constness is not assured in PyBlitzArray_NUMPY_WRAP
Created by: siebenkopf
When we need to return a const numpy array wrapper around a blitz array (as modifying it would lead to inconsistencies, see https://github.com/idiap/bob/issues/220), we'd like to use the
PyBlitzArrayCxx_AsConstNumpy function. Indeed, this function sets the constness flag of the blitz array inside
However, the wrapping function
PyBlitzArray_NUMPY_WRAP does not copy that flag and, consequently, the returned
numpy.ndarray is writeable.
I have just added a test case that checks exactly that. Currently it fails. @anjos: As you wrote that function and you are most familiar with the NumPy C-API, could you please have a look into that? Could you also verify that there are no other flags that need to be copied, too?