# Examples from pyvista.UnstructuredGrid.cell_offsets
# ===================================================

# Return the cell offset array. Since this mesh is composed of all hexahedral
# cells, note how each cell starts at 8 greater than the prior cell.
import pyvista as pv
from pyvista import examples
hex_beam = pv.read(examples.hexbeamfile)
hex_beam.cell_offsets

# The array is read-only and writing to it raises a `ValueError`.
hex_beam.cell_offsets.flags['WRITEABLE']

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