osyris.Vector#
- class osyris.Vector(x, y=None, z=None, name='', unit=None)#
- __init__(x, y=None, z=None, name='', unit=None)#
Methods
__init__(x[, y, z, name, unit])copy()Create a (deep) copy of the vector.
cross(other)Compute the cross product of two vectors.
dot(other)Compute the dot product of two vectors.
reshape(*shape)Reshape the vector arrays.
to(unit)Convert the vector to a new unit.
Attributes
dtypeThe dtype of the vector array.
labelReturn a label for the object with name and unit.
nameThe name of the vector.
nbytesThe number of bytes used by the vector.
ndimThe number of dimensions of the vector array (this is not the same as the number of components).
normCompute the norm of the vector.
nvecThe number of components of the vector.
shapeThe shape of the vector array (this is not the same as the shape of the components).
unitThe unit of the vector.