Creating a geometry from a Python array
Here are some solutions:

1:  


  1) export your drawing in Python (numpy) as SVG file (say using MatPlotLib)
  2) import SVG file into Blender
  3) apply bevel to that


2:
In the following however we did it in a different way.


  1) We traced your image in Inkscape
  2) and exported as SVG file.
  3) In blender we just made it mesh and applied extrude.