Unmangle pointer attempts to unmangle raw data that happens to match the swig format
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
the following value
str(np.getbuffer(np.array([-8.3747958651808272]))) '_A_>\xe5\xbf \xc0'
happens to produce a representation that is considered by UnmanglePointer as a SWIG pointer. The consequence of this is that passing in the python wrapper a numpy.getbuffer to SetVoidArray will complain that "required type is p_void"
result_array.SetVoidArray(np.getbuffer(z_flat), len(z_flat), 1)
This problem is mitigated in vtk7 by using memoryview instead, but if you use a python buffer,. the VTK code detects it as such and attempts the unmangling.
More context for the issue can be found here: