#NEWLINE# def addNumpyToVtk( dataObj , numpyArray , arrayName ) : #NEWLINE# #INDENT# assert ( dataObj . GetNumberOfPoints ( ) == numpyArray . shape [ 0 ] ) #NEWLINE# vtkArray = getVtkFromNumpy ( numpyArray ) #NEWLINE# vtkArray . SetName ( arrayName ) #NEWLINE# dataObj . GetPointData ( ) . AddArray ( vtkArray )