scipp.vector#

scipp.vector(value, *, unit=<automatically deduced unit>)#

Constructs a zero dimensional Variable holding a single length-3 vector.

Parameters:
Returns:

Variable – A scalar (zero-dimensional) variable of a vector.

See also

scipp.vectors

Construct an array of vectors.

scipp.spatial.as_vectors

Construct vectors from Scipp Variables

Examples

>>> sc.vector(value=[1, 2, 3])
<scipp.Variable> ()    vector3  [dimensionless]  (1, 2, 3)
>>> sc.vector(value=[4, 5, 6], unit='m')
<scipp.Variable> ()    vector3              [m]  (4, 5, 6)