# Examples from pyvista.DataSet.point_data
# ========================================

# Add point arrays to a mesh and list the available `point_data`.
import pyvista as pv
import numpy as np
mesh = pv.Cube()
mesh.clear_data()
mesh.point_data['my_array'] = np.random.default_rng().random(mesh.n_points)
mesh.point_data['my_other_array'] = np.arange(mesh.n_points)
mesh.point_data

# Access an array from `point_data`.
mesh.point_data['my_other_array']

# Or access it directly from the mesh.
mesh['my_array'].shape

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

