_PointSetBase.points_to_single

_PointSetBase.points_to_single#

_PointSetBase.points_to_single() Self[source]#

Convert the points datatype to single precision.

Added in version 0.49.

Returns:
pyvista.PointSet

Pointset with points in single precision.

Notes#

This operates in place.

Examples#

Download Python source code | Download Jupyter notebook

Create a mesh that has points of the type float64 and convert the points to float32.

>>> import pyvista as pv
>>> mesh = pv.PolyData([[0.0, 0.0, 0.0]])
>>> mesh.points.dtype
dtype('float64')
>>> _ = mesh.points_to_single()
>>> mesh.points.dtype
dtype('float32')

See Also#

points_to_double
pyvista.core.config.Config.points_dtype

Set the points dtype for a whole session instead of one mesh.