diff --git a/ivy/functional/frontends/paddle/math.py b/ivy/functional/frontends/paddle/math.py index f0ecec9c0d54b..29aefc5ca5d8f 100644 --- a/ivy/functional/frontends/paddle/math.py +++ b/ivy/functional/frontends/paddle/math.py @@ -128,6 +128,12 @@ def atanh(x, name=None): return ivy.atanh(x) +@with_supported_dtypes({"2.5.1 and below": ("int32", "int64")}, "paddle") +@to_ivy_arrays_and_back +def broadcast_shape(x_shape, y_shape): + return ivy.broadcast_shapes(x_shape, y_shape) + + @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle") @to_ivy_arrays_and_back def ceil(x, name=None): diff --git a/ivy/functional/frontends/torch/comparison_ops.py b/ivy/functional/frontends/torch/comparison_ops.py index e4bb1e4b2382c..a40db0d334182 100644 --- a/ivy/functional/frontends/torch/comparison_ops.py +++ b/ivy/functional/frontends/torch/comparison_ops.py @@ -292,7 +292,7 @@ def topk(input, k, dim=None, largest=True, sorted=True, *, out=None): gt = greater +ne = not_equal ge = greater_equal le = less_equal lt = less -ne = not_equal diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py index 664394b8eb716..cd7c7541fed6c 100644 --- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py +++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py @@ -1,5 +1,6 @@ # global from hypothesis import strategies as st +import hypothesis.extra.numpy as nph # local import ivy_tests.test_ivy.helpers as helpers @@ -536,6 +537,34 @@ def test_paddle_atanh( ) +# broadcast_shape +@handle_frontend_test( + fn_tree="paddle.broadcast_shape", + input_shapes_x=nph.mutually_broadcastable_shapes( + num_shapes=2, min_dims=1, max_dims=5, min_side=1, max_side=5 + ), +) +def test_paddle_broadcast_shape( + *, + input_shapes_x, + on_device, + fn_tree, + frontend, + backend_fw, + test_flags, +): + helpers.test_frontend_function( + input_dtypes=["int32", "int64"], + frontend=frontend, + backend_to_test=backend_fw, + test_flags=test_flags, + fn_tree=fn_tree, + on_device=on_device, + x_shape=input_shapes_x[0][0], + y_shape=input_shapes_x[0][1], + ) + + # ceil @handle_frontend_test( fn_tree="paddle.ceil",