quara.math.matrix module
- multiply_veca_vecb(vec_a, vec_b)[source]
returns \(a \cdot b\). this dot means inner product.
- Parameters
vec_a (np.ndarray) – vector a.
vec_b (np.ndarray) – vector b.
- Returns
value of \(a \cdot b\).
- Return type
float
- Raises
ValueError – dimension of vec_a is not 1.(not vector)
ValueError – dimension of vec_b is not 1.(not vector)
- multiply_veca_vecb_matc(vec_a, vec_b, mat_c)[source]
returns \(a \cdot C b\). this dot means inner product.
- Parameters
vec_a (np.ndarray) – vector a.
vec_b (np.ndarray) – vector b.
mat_c (np.ndarray) – matrix C.
- Returns
value of \(a \cdot C b\).
- Return type
float
- Raises
ValueError – dimension of vec_a is not 1.(not vector)
ValueError – dimension of vec_b is not 1.(not vector)
ValueError – dimension of mat_c is not 2.(not matrix)