e15190.utilities.geometry.deco_to_2darray¶
- e15190.utilities.geometry.deco_to_2darray(func)¶
A decorator that turn functions into accepting row vectors.
The argument func is assumed to be a function that does the following mapping:
\[f: \mathbb{R}^k \rightarrow \mathbb{R}^k \ , (x_1, x_2, ..., x_k) \mapsto (y_1, y_2, ..., y_k)\]This decorator will turn the function into accepting 2D array of shape (n_vectors, k). The result is equivalent to looping over the rows of the array and calling the undecorated function.