From da79905a204109405b538943485f2cfd926f19d5 Mon Sep 17 00:00:00 2001 From: Ishtiaq Hussain <53497039+Ishticode@users.noreply.github.com> Date: Thu, 7 Mar 2024 15:56:53 +0000 Subject: [PATCH] fix: ensure traced function returns are converted to ivy in testing (#28494) --- ivy_tests/test_ivy/helpers/function_testing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ivy_tests/test_ivy/helpers/function_testing.py b/ivy_tests/test_ivy/helpers/function_testing.py index 6d7ecd8ebbd5b..2e170c8effb0a 100644 --- a/ivy_tests/test_ivy/helpers/function_testing.py +++ b/ivy_tests/test_ivy/helpers/function_testing.py @@ -2580,6 +2580,8 @@ def get_ret_and_flattened_np_array( with BackendHandler.update_backend(backend_to_test) as ivy_backend: with ivy_backend.PreciseMode(precision_mode): ret = fn(*args, **kwargs) + if test_trace or test_trace_each: + ret = ivy_backend.to_ivy(ret, True) def map_fn(x): if _is_frontend_array(x):