How to use the simdkalman.primitives.ensure_matrix 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_ensure_matrix(self):
        self.assertMatrixEqual(primitives.ensure_matrix(3), np.eye(1)*3)
        self.assertMatrixEqual(primitives.ensure_matrix([[3.0]]), np.eye(1)*3)
        self.assertMatrixEqual(primitives.ensure_matrix(np.eye(1)), np.eye(1))
        self.assertMatrixEqual(primitives.ensure_matrix(np.eye(3)), np.eye(3))
github oseiskar / simdkalman / tests / testsuite.py View on Github external
def test_ensure_matrix(self):
        self.assertMatrixEqual(primitives.ensure_matrix(3), np.eye(1)*3)
        self.assertMatrixEqual(primitives.ensure_matrix([[3.0]]), np.eye(1)*3)
        self.assertMatrixEqual(primitives.ensure_matrix(np.eye(1)), np.eye(1))
        self.assertMatrixEqual(primitives.ensure_matrix(np.eye(3)), np.eye(3))