osyris.Vector

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

dtype

The dtype of the vector array.

label

Return a label for the object with name and unit.

name

The name of the vector.

nbytes

The number of bytes used by the vector.

ndim

The number of dimensions of the vector array (this is not the same as the number of components).

norm

Compute the norm of the vector.

nvec

The number of components of the vector.

shape

The shape of the vector array (this is not the same as the shape of the components).

unit

The unit of the vector.