copapy.vector#
- class copapy.vector(values)#
Bases:
ArrayType[TNum]Mathematical vector class supporting basic operations and interactions with values.
- ndim#
Number of dimensions (always 1 for vector).
- Type:
int
- shape#
Shape of the vector as a tuple.
- Type:
tuple[int, …]
Create a vector with given values.
- Parameters:
values (
Iterable[TypeVar(TNum,int,float) |value[TypeVar(TNum,int,float)]]) – iterable of constant values
- dot(other)#
- Return type:
Any
- get_scalar(index)#
Get a single scalar value from the vector.
- Return type:
TypeVar(TNum,int,float) |value[TypeVar(TNum,int,float)]
- map(func)#
Applies a function to each element of the vector and returns a new vector.
- sum()#
Sum of all vector elements.
- Return type:
Any