Wrap matrix data function instead of image in Python wrappers