This commit provides vectorized implementations for the following functions:
affines.compose
affines.decompose44
euler.euler2mat
euler.mat2euler
I tried to keep the code as close as possible to the current implementation, using idiomatic Numpy code to handle scalars and batches in a single code path. The functions accept inputs with an arbitrary number of batch dimensions in front of the expected input shape. Functions that expect a (3, 3) matrix, for example, will accept arrays with shape (..., 3, 3).
I propose to discuss any changes to bring these to a mergeable state, then same approach can be used to vectorize other functions in the library.
The changes should be backwards compatible and entirely transparent for existing users. Existing tests all pass, let me know if you had something specific in mind on additional tests for this functionality in #14.
This commit provides vectorized implementations for the following functions:
affines.compose
affines.decompose44
euler.euler2mat
euler.mat2euler
I tried to keep the code as close as possible to the current implementation, using idiomatic Numpy code to handle scalars and batches in a single code path. The functions accept inputs with an arbitrary number of batch dimensions in front of the expected input shape. Functions that expect a (3, 3) matrix, for example, will accept arrays with shape (..., 3, 3).
I propose to discuss any changes to bring these to a mergeable state, then same approach can be used to vectorize other functions in the library.
The changes should be backwards compatible and entirely transparent for existing users. Existing tests all pass, let me know if you had something specific in mind on additional tests for this functionality in #14.