diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_blas_and_lapack_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_blas_and_lapack_ops.py index 8e6a654d79456..f66853869c8e4 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_blas_and_lapack_ops.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_blas_and_lapack_ops.py @@ -540,10 +540,9 @@ def test_torch_cholesky( backend_fw, ): dtype, x = dtype_and_x - x = x[0] - x = ( - np.matmul(x.T, x) + np.identity(x.shape[0]) * 1e-3 - ) # make symmetric positive-definite + x = np.asarray(x[0], dtype=dtype[0]) + x = np.matmul(np.conjugate(x.T), x) + np.identity(x.shape[0], dtype=dtype[0]) + # make symmetric positive-definite helpers.test_frontend_function( input_dtypes=dtype, backend_to_test=backend_fw, diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_linalg.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_linalg.py index 9686bdf183982..3fe907273c191 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_linalg.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_linalg.py @@ -319,8 +319,8 @@ def test_torch_cholesky( ): dtype, x = dtype_and_x x = np.asarray(x[0], dtype=dtype[0]) - x = np.matmul(x.T, x) + np.identity(x.shape[0]) # make symmetric positive-definite - + x = np.matmul(np.conjugate(x.T), x) + np.identity(x.shape[0], dtype=dtype[0]) + # make symmetric positive-definite helpers.test_frontend_function( input_dtypes=dtype, backend_to_test=backend_fw,