tsadar.utils.vector_tools#
Functions
|
Rotates a matrix A by an angle theta in the counter-clockwise direction. |
|
Custom function for adding an array dimension to the ND-arrays in vectors. |
|
Custom function for vector addition where a and b are tuples of ND-arrays with the first element being the ND-array of x-values and the second element being the ND-array of y-values. |
|
Custom function for division of a vector by a scalar. |
|
Custom function for vector dot product where a and b are tuples of ND-arrays with the first element being the ND-array of x-values and the second element being the ND-array of y-values. |
|
Custom function for vector subtraction where a and b are tuples of ND-arrays with the first element being the ND-array of x-values and the second element being the ND-array of y-values. |
- tsadar.utils.vector_tools.vadd(a, b)Source#
Custom function for vector addition where a and b are tuples of ND-arrays with the first element being the ND-array of x-values and the second element being the ND-array of y-values.
- Parameters:
a – tuple of ND-arrays where the first element is x-values and the second is y-values
b – tuple of ND-arrays where the first element is x-values and the second is y-values
- Returns:
c – tuple of ND-arrays where the first element is x-values and the second is y-values
- tsadar.utils.vector_tools.vsub(a, b)Source#
Custom function for vector subtraction where a and b are tuples of ND-arrays with the first element being the ND-array of x-values and the second element being the ND-array of y-values.
- Parameters:
a – tuple of ND-arrays where the first element is x-values and the second is y-values
b – tuple of ND-arrays where the first element is x-values and the second is y-values
- Returns:
c – tuple of ND-arrays where the first element is x-values and the second is y-values
- tsadar.utils.vector_tools.vdot(a, b)Source#
Custom function for vector dot product where a and b are tuples of ND-arrays with the first element being the ND-array of x-values and the second element being the ND-array of y-values. If on of the vector only has one component it is treated as a scalar.
- Parameters:
a – tuple of ND-arrays where the first element is x-values and the second is y-values or an ND-array
b – tuple of ND-arrays where the first element is x-values and the second is y-values or an ND-array
- Returns:
c – ND-array or tuple of ND-arrays based off the operation being a dot product or scalar product
- tsadar.utils.vector_tools.vdiv(a, b)Source#
Custom function for division of a vector by a scalar.
- Parameters:
a – tuple of ND-arrays where the first element is x-values and the second is y-values
b – ND-array
- Returns:
c – tuple of ND-arrays
- tsadar.utils.vector_tools.v_add_dim(a)Source#
Custom function for adding an array dimension to the ND-arrays in vectors.
- Parameters:
a – vector to add a dimension to, tuple of ND-arrays where the first element is x-values and the second is y-values
- Returns:
c – vector with additional dimension, tuple of ND-arrays