active_vectors#

property DataSetAttributes.active_vectors: Optional[numpy.ndarray]#

Return the active vectors as a pyvista_ndarray.

Changed in version 0.32.0: Can no longer be used to set the active vectors. Either use DataSetAttributes.set_vectors() or if the array already exists, assign to DataSetAttribute.active_vectors_name.

Examples

Associate point data to a simple cube mesh and show that the active vectors in the point array are the most recently added array.

>>> import pyvista
>>> import numpy as np
>>> mesh = pyvista.Cube()
>>> vectors = np.random.random((mesh.n_points, 3))
>>> mesh.point_data.set_vectors(vectors, 'my-vectors')
>>> vectors_out = mesh.point_data.active_vectors
>>> vectors_out.shape
(8, 3)