Terrain generation with height map
A way of achieving this would be to save the matrix as an .exr image texture (for instance using the imageio package and its imwrite() function).

You can then create a plane and add a Subdivision Surface modifier (on the wrench in the menu) changing from Catmull-Clark to Simple, and then add a Displace modifier.

On the Displace modifier, click New to create a new texture and then go to the texture menu (a square like a chess board).

There you can open your .exr image.

Now if you go back to the modifiers menu, as you increase the viewport subdivisions in the Subdiv modifier you should see how the plane starts to resemble your image.

If there's interest on this I'll add more details and screenshots :)