Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
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))