parameters: (vmatrix, narray)
docstring: Update VTK matrix values from a numpy array.
    :param vmatrix: VTK matrix (vtkMatrix4x4 or vtkMatrix3x3) that will be update
    :param narray: input numpy array
    To set numpy array from VTK matrix, use :py:meth:`arrayFromVTKMatrix`.
docstring_summary: Update VTK matrix values from a numpy array.
    :param vmatrix: VTK matrix (vtkMatrix4x4 or vtkMatrix3x3) that will be update
    :param narray: input numpy array
    To set numpy array from VTK matrix, use :py:meth:`arrayFromVTKMatrix`.
docstring_tokens: Update VTK matrix values from a numpy array . : param vmatrix : VTK matrix ( vtkMatrix4x4 or vtkMatrix3x3 ) that will be update : param narray : input numpy array To set numpy array from VTK matrix use : py : meth : arrayFromVTKMatrix .
function: def updateVTKMatrixFromArray(vmatrix, narray):
    """Update VTK matrix values from a numpy array.
    :param vmatrix: VTK matrix (vtkMatrix4x4 or vtkMatrix3x3) that will be update
    :param narray: input numpy array
    To set numpy array from VTK matrix, use :py:meth:`arrayFromVTKMatrix`.
    """
    from vtk import vtkMatrix4x4
    from vtk import vtkMatrix3x3
    if isinstance(vmatrix, vtkMatrix4x4):
      matrixSize = 4
    elif isinstance(vmatrix, vtkMatrix3x3):
      matrixSize = 3
    else:
      raise RuntimeError("Output vmatrix must be vtk.vtkMatrix3x3 or vtk.vtkMatrix4x4")
    if narray.shape != (matrixSize, matrixSize):
      raise RuntimeError("Input narray size must match output vmatrix size ({0}x{0})".format(matrixSize))
    vmatrix.DeepCopy(narray.ravel())
function_tokens: def updateVTKMatrixFromArray ( vmatrix , narray ) : from vtk import vtkMatrix4x4 from vtk import vtkMatrix3x3 if isinstance ( vmatrix , vtkMatrix4x4 ) : matrixSize = 4 elif isinstance ( vmatrix , vtkMatrix3x3 ) : matrixSize = 3 else : raise RuntimeError ( "Output vmatrix must be vtk.vtkMatrix3x3 or vtk.vtkMatrix4x4" ) if narray . shape != ( matrixSize , matrixSize ) : raise RuntimeError ( "Input narray size must match output vmatrix size ({0}x{0})" . format ( matrixSize ) ) vmatrix . DeepCopy ( narray . ravel ( ) )