vtk_points#
- vtk_points(points, deep=True, force_float=False)[source]#
Convert numpy array or array-like to a
vtkPoints
object.- Parameters
- points
numpy.ndarray
or sequence Points to convert. Should be 1 or 2 dimensional. Accepts a single point or several points.
- deepbool,
optional
Perform a deep copy of the array. Only applicable if
points
is anumpy.ndarray
.- force_floatbool,
optional
Casts the datatype to
float32
if points datatype is non-float. Set this toFalse
to allow non-float types, though this may lead to truncation of intermediate floats when transforming datasets.
- points
- Returns
vtk.vtkPoints
The vtkPoints object.
Examples
>>> import pyvista >>> import numpy as np >>> points = np.random.random((10, 3)) >>> vpoints = pyvista.vtk_points(points) >>> vpoints (vtkmodules.vtkCommonCore.vtkPoints)0x7f0c2e26af40