get_array#
- get_array(mesh, name, preference='cell', err=False) Optional[numpy.ndarray] [source]#
Search point, cell and field data for an array.
- Parameters
- mesh
pyvista.DataSet
Dataset to get the array from.
- name
str
The name of the array to get the range.
- preference
str
,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.
- mesh
- Returns
pyvista.pyvista_ndarray
orNone
Requested array. Return
None
if there is no array matching thename
anderr=False
.