From b2b96746c6455a0fa639c33941ef303f02b0b4ea Mon Sep 17 00:00:00 2001 From: ivy-branch Date: Tue, 24 Oct 2023 20:24:17 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Lint=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test_paddle/test_tensor/test_tensor.py | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py index 0637f68d115ca..dbe6e9e657126 100644 --- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py +++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py @@ -4578,6 +4578,52 @@ def test_paddle_tensor_tile( ) +# unstack +@handle_frontend_method( + class_tree=CLASS_TREE, + init_tree="paddle.to_tensor", + method_name="unstack", + dtype_value=helpers.dtype_and_values( + available_dtypes=helpers.get_dtypes("numeric"), + min_num_dims=2, + max_num_dims=2, + max_dim_size=1, + ), + axis=helpers.get_axis( + shape=st.shared(helpers.get_shape(), key="shape"), + allow_neg=True, + force_int=True, + ), +) +def test_paddle_tensor_unstack( + dtype_value, + axis, + frontend_method_data, + init_flags, + method_flags, + frontend, + on_device, + backend_fw, +): + input_dtype, x = dtype_value + helpers.test_frontend_method( + init_input_dtypes=input_dtype, + backend_to_test=backend_fw, + init_all_as_kwargs_np={ + "data": x[0], + }, + method_input_dtypes=input_dtype, + method_all_as_kwargs_np={ + "axis": axis, + }, + frontend_method_data=frontend_method_data, + init_flags=init_flags, + method_flags=method_flags, + frontend=frontend, + on_device=on_device, + ) + + # topk @handle_frontend_method( class_tree=CLASS_TREE, @@ -4888,52 +4934,6 @@ def test_paddle_unsqueeze_( ) -# unstack -@handle_frontend_method( - class_tree=CLASS_TREE, - init_tree="paddle.to_tensor", - method_name="unstack", - dtype_value=helpers.dtype_and_values( - available_dtypes=helpers.get_dtypes("numeric"), - min_num_dims=2, - max_num_dims=2, - max_dim_size=1, - ), - axis=helpers.get_axis( - shape=st.shared(helpers.get_shape(), key="shape"), - allow_neg=True, - force_int=True, - ), -) -def test_paddle_tensor_unstack( - dtype_value, - axis, - frontend_method_data, - init_flags, - method_flags, - frontend, - on_device, - backend_fw, -): - input_dtype, x = dtype_value - helpers.test_frontend_method( - init_input_dtypes=input_dtype, - backend_to_test=backend_fw, - init_all_as_kwargs_np={ - "data": x[0], - }, - method_input_dtypes=input_dtype, - method_all_as_kwargs_np={ - "axis": axis, - }, - frontend_method_data=frontend_method_data, - init_flags=init_flags, - method_flags=method_flags, - frontend=frontend, - on_device=on_device, - ) - - # var @handle_frontend_method( class_tree=CLASS_TREE,