How to use the simdkalman.primitives.ddot_t_right function in simdkalman

To help you get started, we’ve selected a few simdkalman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oseiskar / simdkalman / tests / testsuite.py View on Github external
def test_t_ddot(self):

        vec = lambda *args: np.array(args)[np.newaxis,:,np.newaxis]
        T =  lambda x: x.transpose((0,2,1))
        stack_mats = lambda *args: np.vstack([a[np.newaxis,...] for a in args])

        self.assertMatrixEqual( \
            primitives.ddot_t_right( \
                T(np.vstack([vec(1,2), vec(3,4), vec(5,6)])),
                stack_mats(np.eye(2)*1, np.array([[2,0],[1,1]]), np.eye(2)*3)), \
            T(np.vstack([vec(1,2), vec(6, 7), vec(15, 18)])))