set_default_active_vectors#
- set_default_active_vectors(mesh: DataSet) _ActiveArrayExistsInfoTuple[source]#
Set a default vectors array on mesh, if not already set.
If an active vector already exists, no changes are made.
If an active vectors does not exist, it checks for possibly cell or point arrays with shape
(n, 3). If only one exists, then it is set as the active vectors. Otherwise, an error is raised.Changed in version 0.45: The field and name of the active array is now returned. Previously,
Nonewas returned.- Parameters:
- mesh
pyvista.DataSet Dataset to set default active vectors.
- mesh
- Returns:
- Raises:
pyvista.core.errors.MissingDataErrorIf no vector-like arrays exist.
pyvista.core.errors.AmbiguousDataErrorIf more than one vector-like arrays exist.