get_array

get_array(mesh, name, preference='cell', err=False) Optional[numpy.ndarray]

Search point, cell and field data for an array.

Parameters
meshpyvista.DataSet

Dataset to get the array from.

namestr

The name of the array to get the range.

preferencestr, optional

When scalars is specified, this is the preferred array type to search for in the dataset. Must be either 'point', 'cell', or 'field'.

errbool, optional

Whether to throw an error if array is not present.

Returns
pyvista.pyvista_ndarray or None

Requested array. Return None if there is no array matching the name and err=False.