vtkmatrix_from_array#
- vtkmatrix_from_array(array)[source]#
Convert a
numpy.ndarray
or array-like to a vtk matrix.- Parameters
- array
numpy.ndarray
or array_like The array or array-like to be converted to a vtk matrix. Shape (3, 3) gets converted to a
vtk.vtkMatrix3x3
, shape (4, 4) gets converted to avtk.vtkMatrix4x4
. No other shapes are valid.
- array
- Returns
vtk.vtkMatrix3x3
orvtk.vtkMatrix4x4
VTK matrix.