PyEVSpace Documentation#
The pyevspace module defines a vector and a matrix type to define a Euclidean vector space within Python projects. The Vector allows you to represent physical quantites like positions, velocities, accelerations and forces. The Matrix type allows us to represent idealized reference frames and to create linear transformations, most usefully pure rotations to move vectors between reference frames. A handful of module level functions for manipulating vectors and matrices are also available.
Note
The underlying data type of the internal array is a C type
double
. This obviously supports any type that can be represented
as a Python float
, which includes Python int
types.
Therefore numeric types are interpreted in the following order:
float
s are converted to a Cdouble
A conversion is attempted with the type’s
__float__()
methodA conversion is attempted with the type’s
__index__()
methodNo suitable conversion can be made and a TypeError is raised
Therefore in this documentation a numeric type is any type that is
either a float
or int
or can be converted to a
float
or int
.
Available Types#
- class pyevspace.Vector
A three-dimensional array object meant to represent a physical vector in a Euclidean vector space. The internal data buffer is a C type double, which supports numeric types.
- class pyevspace.Matrix
A three by three-dimensional array object mean to represent a linear transformation of physical vectors in a Euclidean vector space. The internal data buffer is a C type
double
, which supports numeric types.