pysdic.PointCloud.to_npz#
- PointCloud.to_npz(filepath, save_properties=True)[source]#
Save the point cloud to a NumPy NPZ file.
The points will be saved as an array named ‘points’ with shape \((N_p, E)\). Additional properties will be saved as separate arrays in the NPZ file with names in the format
"_properties/{property_name}".See also
from_npz()method for creating aPointCloudobject from a NPZ file.
- Parameters:
- Return type:
None
Examples
Saving a
PointCloudobject to a NPZ file.1from pysdic import PointCloud 2import numpy as np 3 4# Create a random point cloud with 100 points 5random_points = np.random.rand(100, 3) # shape (100, 3) 6point_cloud = PointCloud.from_array(random_points) 7 8# Save the point cloud to a NPZ file 9point_cloud.to_npz('path/to/output_point_cloud.npz')
This will save the points and properties of the point cloud to the specified NPZ file.