_PointSetBase.points_to_double#
- _PointSetBase.points_to_double() Self[source]#
Convert the points datatype to double precision.
- Returns:
pyvista.PointSetPointset with points in double precision.
Notes#
This operates in place.
Warning
Converting up does not recover precision that has already been lost. If a
filter computed in single precision, its output holds single-precision
values whatever dtype they are given afterwards. See
pyvista.core.config.Config.points_dtype for finding out where that
happens.
Examples#
Download Python source code | Download Jupyter notebook
Create a mesh that has points of the type float32 and
convert the points to float64.
>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> mesh.points.dtype
dtype('float32')
>>> _ = mesh.points_to_double()
>>> mesh.points.dtype
dtype('float64')
See Also#
points_to_singlepyvista.core.config.Config.points_dtypeSet the points dtype for a whole session instead of one mesh.