#NEWLINE# def getVtkFromNumpy( numpyArray ) : #NEWLINE# #INDENT# def MakeCallback( numpyArray ) : #NEWLINE# #INDENT# def Closure( caller , event ) : #NEWLINE# #INDENT# closureArray = numpyArray #NEWLINE# #UNINDENT# return Closure #NEWLINE# #UNINDENT# vtkArray = numpy_support . numpy_to_vtk ( numpyArray ) #NEWLINE# vtkArray . AddObserver ( 'DeleteEvent' , MakeCallback ( numpyArray ) ) #NEWLINE# return numpyArray