Creating Volume from Numpy

What I am doing is improve the resolution for “import model as segment”
Firstly, I need create a volume by python script…
Secondly, I will porform crop volume, and then the model could be imported as a segment…Finally, the resolution for 3d reconstruction will be higher
So, would you like to gvie me some advice to such a script? Thanks