# Examples from pyvista.DataSetAttributes.get_array
# =================================================

# Store data with point association in a DataSet.
import pyvista as pv
mesh = pv.Cube()
mesh.clear_data()
mesh.point_data['my_data'] = range(mesh.n_points)

# Access using an index.
mesh.point_data.get_array(0)

# Access using a key.
mesh.point_data.get_array('my_data')

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

