pyvista.array_from_vtkmatrix

pyvista.array_from_vtkmatrix#

array_from_vtkmatrix(matrix) NumpyArray[float][source]#

Convert a vtk matrix to an array.

Parameters:
matrixvtk.vtkMatrix3x3 | vtk.vtkMatrix4x4

The vtk matrix to be converted to a numpy.ndarray. Returned ndarray has shape (3, 3) or (4, 4) as appropriate.

Returns:
numpy.ndarray

Numpy array containing the data from matrix.