If you have the array associated to a storable mrml node then you can write it to file as shown here.
To create a volume node out of your numpy array,
- Add a volume node:
volume_node = slicer.mrmlScene.AddNewNodeByClass("vktMRMLScalarVolumeNode")
- Set the values of
volume_node
's underlying vtkImageData usingslicer.util.updateVolumeFromArray
described here.