internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ivy-llc/ivy

Issue:
Fixed elu experimental api



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/jax/experimental/activations.py b/ivy/functional/backends/jax/experimental/activations.py
--- a/ivy/functional/backends/jax/experimental/activations.py
+++ b/ivy/functional/backends/jax/experimental/activations.py
@@ -73,6 +73,7 @@ def silu(x: JaxArray, /, *, out: Optional[JaxArray] = None) -> JaxArray:
     return ret
 
 
+@with_unsupported_dtypes({"0.4.14 and below": ("float16", "bfloat16")}, backend_version)
 def elu(
     x: JaxArray, /, *, alpha: float = 1.0, out: Optional[JaxArray] = None
 ) -> JaxArray:
diff --git a/ivy/functional/backends/tensorflow/experimental/activations.py b/ivy/functional/backends/tensorflow/experimental/activations.py
--- a/ivy/functional/backends/tensorflow/experimental/activations.py
+++ b/ivy/functional/backends/tensorflow/experimental/activations.py
@@ -74,8 +74,7 @@ def silu(
 
 @with_supported_dtypes({"2.15.0 and below": ("float",)}, backend_version)
 def elu(x: Tensor, /, *, alpha: float = 1.0, out: Optional[Tensor] = None) -> Tensor:
-    alpha = tf.cast(alpha, x.dtype)
-    ret = tf.cast(tf.where(x > 0, x, tf.multiply(alpha, tf.math.expm1(x))), x.dtype)
+    ret = tf.keras.activations.elu(x, alpha)
     if ivy.exists(out):
         return ivy.inplace_update(out, ret).astype(x.dtype)
     return ivy.astype(ret, x.dtype)
diff --git a/ivy/functional/backends/torch/experimental/activations.py b/ivy/functional/backends/torch/experimental/activations.py
--- a/ivy/functional/backends/torch/experimental/activations.py
+++ b/ivy/functional/backends/torch/experimental/activations.py
@@ -62,7 +62,7 @@ def silu(x: torch.Tensor, /, *, out: Optional[torch.Tensor] = None) -> torch.Ten
     return torch.nn.functional.silu(x)
 
 
-@with_unsupported_dtypes({"2.1.2 and below": ("float16",)}, backend_version)
+@with_unsupported_dtypes({"2.1.2 and below": ("float16", "bfloat16")}, backend_version)
 def elu(
     x: torch.Tensor, /, *, alpha: float = 1.0, out: Optional[torch.Tensor] = None
 ) -> torch.Tensor:


Test patch:
diff --git a/ivy_tests/test_ivy/test_functional/test_experimental/test_nn/test_activations.py b/ivy_tests/test_ivy/test_functional/test_experimental/test_nn/test_activations.py
--- a/ivy_tests/test_ivy/test_functional/test_experimental/test_nn/test_activations.py
+++ b/ivy_tests/test_ivy/test_functional/test_experimental/test_nn/test_activations.py
@@ -40,7 +40,7 @@ def test_celu(
 @handle_test(
     fn_tree="functional.ivy.experimental.elu",
     dtype_and_x=helpers.dtype_and_values(
-        available_dtypes=helpers.get_dtypes("valid"),
+        available_dtypes=helpers.get_dtypes("float_and_complex"),
         large_abs_safety_factor=8,
         small_abs_safety_factor=8,
         safety_factor_scale="log",
Repository: ivy-llc/ivy

Issue:
Un-necessary argument `dtype` passed in function call `ivy.all()`
In the following function call, the argument `dtype` is un-necessarily passed
https://github.com/unifyai/ivy/blob/3318cd16ec60a05a467393c64afbdd65d46ce2de/ivy/functional/frontends/paddle/tensor/tensor.py#L563-L566
From the actual function definition of `ivy.all()`, there is no argument `dtype`
https://github.com/unifyai/ivy/blob/3318cd16ec60a05a467393c64afbdd65d46ce2de/ivy/functional/ivy/utility.py#L28-L35
Also, from the PaddlePaddle docs we can see that there is no `dtype` argument for the `all()` function.
https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/all_en.html#all


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -560,9 +560,9 @@ def isfinite(self, name=None):
         return paddle_frontend.isfinite(self)
 
     @with_supported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
-    def all(self, axis=None, keepdim=False, dtype=None, name=None):
+    def all(self, axis=None, keepdim=False, name=None):
         return paddle_frontend.Tensor(
-            ivy.all(self.ivy_array, axis=axis, keepdims=keepdim, dtype=dtype)
+            ivy.all(self.ivy_array, axis=axis, keepdims=keepdim)
         )
 
     @with_supported_dtypes({"2.5.2 and below": ("float16", "bfloat16")}, "paddle")


Test patch:
Repository: ivy-llc/ivy

Issue:
`logging.warn()` is deprecated and will be removed in the future, instead use `logging.warning()`
`logging.warn()` has been deprecated since Python 3.3 and `logging.warning()` should be used.
The two functions are functionally equivalent, but `logging.warn()` is no longer considered the preferred way to log warnings.


Discussion:

Resolving patch:
diff --git a/ivy/wrappers/utils.py b/ivy/wrappers/utils.py
--- a/ivy/wrappers/utils.py
+++ b/ivy/wrappers/utils.py
@@ -14,7 +14,7 @@
 def download_cython_wrapper(func_name: str):
     """Get the wrapper for the given function name."""
     if func_name + ".so" not in wrappers["ivy"]["functional"]:
-        logging.warn(f"Wrapper for {func_name} not found.")
+        logging.warning(f"Wrapper for {func_name} not found.")
         return False
     try:
         response = request.urlopen(
@@ -29,7 +29,7 @@ def download_cython_wrapper(func_name: str):
         print("Downloaded wrapper for " + func_name)
         return True
     except request.HTTPError:
-        logging.warn(f"Unable to download wrapper for {func_name}.")
+        logging.warning(f"Unable to download wrapper for {func_name}.")
         return False
 
 


Test patch:
diff --git a/ivy_tests/test_ivy/helpers/function_testing.py b/ivy_tests/test_ivy/helpers/function_testing.py
--- a/ivy_tests/test_ivy/helpers/function_testing.py
+++ b/ivy_tests/test_ivy/helpers/function_testing.py
@@ -66,7 +66,7 @@ def traced_if_required(backend: str, fn, test_trace=False, args=None, kwargs=Non
             except Exception:
                 import logging
 
-                logging.warn("API key is invalid, test_trace is skipped.")
+                logging.warning("API key is invalid, test_trace is skipped.")
     return fn
Repository: ivy-llc/ivy

Issue:
Wrong key-word argument `dim` in function call `ivy.ifftn()`
In the following function call, the key-word argument `dim` is used:
https://github.com/unifyai/ivy/blob/61c5e083cd33860401a489b434ea46ab7b260e54/ivy/functional/frontends/paddle/fft.py#L283
From the actual function definition, the argument should be `axes`
https://github.com/unifyai/ivy/blob/207dec0cee120a5898749d7b3f7b984341fff313/ivy/functional/ivy/experimental/layers.py#L2789-L2796


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/fft.py b/ivy/functional/frontends/paddle/fft.py
--- a/ivy/functional/frontends/paddle/fft.py
+++ b/ivy/functional/frontends/paddle/fft.py
@@ -280,7 +280,7 @@ def irfft2(x, s=None, axes=(-2, -1), norm="backward"):
     # Calculate the normalization factor 'n' based on the shape 's'
     n = ivy.prod(ivy.array(s))
 
-    result = ivy.ifftn(x, dim=axes[0], norm=norm)
+    result = ivy.ifftn(x, axes=axes[0], norm=norm)
 
     # Normalize the result based on the 'norm' parameter
     if norm == "backward":


Test patch:
Repository: ivy-llc/ivy

Issue:
Fixed silu activation 



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/tensorflow/experimental/activations.py b/ivy/functional/backends/tensorflow/experimental/activations.py
--- a/ivy/functional/backends/tensorflow/experimental/activations.py
+++ b/ivy/functional/backends/tensorflow/experimental/activations.py
@@ -59,7 +59,7 @@ def selu(x: Tensor, /, *, out: Optional[Tensor] = None) -> Tensor:
     return ivy.astype(ret, x.dtype)
 
 
-@with_unsupported_dtypes({"2.15.0 and below": ("complex",)}, backend_version)
+@with_supported_dtypes({"2.15.0 and below": ("float",)}, backend_version)
 def silu(
     x: Tensor,
     /,
diff --git a/ivy/functional/backends/torch/experimental/activations.py b/ivy/functional/backends/torch/experimental/activations.py
--- a/ivy/functional/backends/torch/experimental/activations.py
+++ b/ivy/functional/backends/torch/experimental/activations.py
@@ -57,7 +57,7 @@ def selu(x: torch.Tensor, /, *, out: Optional[torch.Tensor] = None) -> torch.Ten
     return ivy.astype(ret, x.dtype)
 
 
-@with_unsupported_dtypes({"2.1.2 and below": ("float16",)}, backend_version)
+@with_unsupported_dtypes({"2.1.2 and below": ("float16", "bfloat16")}, backend_version)
 def silu(x: torch.Tensor, /, *, out: Optional[torch.Tensor] = None) -> torch.Tensor:
     return torch.nn.functional.silu(x)
 


Test patch:
Repository: ivy-llc/ivy

Issue:
Unnecessary key-word argument `device` in `ivy.blackman_window()` function call
In the following function call, the argument `device` is passed,
https://github.com/unifyai/ivy/blob/06508027180ea29977b4cafd316d536247cb5664/ivy/data_classes/array/experimental/creation.py#L170-L172
From the actual definition of `blackman_window` there is no argument `device`
https://github.com/unifyai/ivy/blob/06508027180ea29977b4cafd316d536247cb5664/ivy/functional/ivy/experimental/creation.py#L684-L690


Discussion:

Resolving patch:
diff --git a/ivy/data_classes/array/experimental/creation.py b/ivy/data_classes/array/experimental/creation.py
--- a/ivy/data_classes/array/experimental/creation.py
+++ b/ivy/data_classes/array/experimental/creation.py
@@ -167,9 +167,7 @@ def blackman_window(
         ivy.array([-1.38777878e-17,  1.30000000e-01,  6.30000000e-01,  1.00000000e+00,
         6.30000000e-01,  1.30000000e-01, -1.38777878e-17])
         """
-        return ivy.blackman_window(
-            self._data, periodic=periodic, dtype=dtype, device=device, out=out
-        )
+        return ivy.blackman_window(self._data, periodic=periodic, dtype=dtype, out=out)
 
     def trilu(
         self: ivy.Array,


Test patch:
Repository: ivy-llc/ivy

Issue:
Global variable `avg` undefined at the module level
In the following line, we are initializing a `global variable` but, the variable is not defined in the module scope.
https://github.com/unifyai/ivy/blob/06508027180ea29977b4cafd316d536247cb5664/ivy/functional/frontends/numpy/statistics/averages_and_variances.py#L16-L17
The variable `avg` is only used in that function and not anywhere else in the file.
So, the `global` statement is un-necessary and the `avg` variable can be defined normally in the function.


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/statistics/averages_and_variances.py b/ivy/functional/frontends/numpy/statistics/averages_and_variances.py
--- a/ivy/functional/frontends/numpy/statistics/averages_and_variances.py
+++ b/ivy/functional/frontends/numpy/statistics/averages_and_variances.py
@@ -13,7 +13,6 @@
 @from_zero_dim_arrays_to_scalar
 def average(a, /, *, axis=None, weights=None, returned=False, keepdims=False):
     axis = tuple(axis) if isinstance(axis, list) else axis
-    global avg
     avg = 0
 
     if keepdims is None:


Test patch:
Repository: ivy-llc/ivy

Issue:
Wrong key-word arguments `dtype` and `device` in `ivy.polyval()` function call
In the following function call, the key-word arguments `dtype` and `device` are used,
https://github.com/unifyai/ivy/blob/66e0c4905908633fa1b2966d6da05a183c9f40d5/ivy/data_classes/array/experimental/creation.py#L342-L347
From the actual `def` of `polyval` function, there are no arguments `dtype` and `device`.
https://github.com/unifyai/ivy/blob/66e0c4905908633fa1b2966d6da05a183c9f40d5/ivy/functional/ivy/experimental/creation.py#L1167-L1170



Discussion:

Resolving patch:
diff --git a/ivy/data_classes/array/experimental/creation.py b/ivy/data_classes/array/experimental/creation.py
--- a/ivy/data_classes/array/experimental/creation.py
+++ b/ivy/data_classes/array/experimental/creation.py
@@ -342,6 +342,4 @@ def polyval(
     return ivy.polyval(
         coeffs,
         x,
-        dtype=dtype,
-        device=device,
     )


Test patch:
Repository: ivy-llc/ivy

Issue:
`inspect.getargspec()` is deprecated, instead use `inspect.getfullargspec()`
In the following line, `inspect.getargspect()` is used,
https://github.com/unifyai/ivy/blob/66e0c4905908633fa1b2966d6da05a183c9f40d5/ivy/functional/frontends/torch/utilities.py#L30
The `getargspec()` function, deprecated since Python 3.0; use [inspect.signature()](https://docs.python.org/3/library/inspect.html#inspect.signature) or [inspect.getfullargspec()](https://docs.python.org/3/library/inspect.html#inspect.getfullargspec) instead.

For reference:
https://docs.python.org/3/library/inspect.html#inspect.getfullargspec


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/utilities.py b/ivy/functional/frontends/torch/utilities.py
--- a/ivy/functional/frontends/torch/utilities.py
+++ b/ivy/functional/frontends/torch/utilities.py
@@ -27,7 +27,7 @@ def bincount(x, weights=None, minlength=0):
 
 
 def if_else(cond_fn, body_fn, orelse_fn, vars):
-    cond_keys = inspect.getargspec(cond_fn).args
+    cond_keys = inspect.getfullargspec(cond_fn).args
     cond_vars = dict(zip(cond_keys, vars))
     return ivy.if_else(cond_fn, body_fn, orelse_fn, cond_vars)
 


Test patch:
Repository: ivy-llc/ivy

Issue:
jax backend with torch frontend setitem issues
### Bug Explanation

the following torch front code with jax fails while works in native jax

### Steps to Reproduce Bug

```python
import ivy
import torch
import ivy.functional.frontends.torch as torch_frontend

x = torch.ones((2, 2))
val = torch.tensor([5.])
x[(0, 0)] = val

ivy.set_jax_backend()
x = torch_frontend.ones((2, 2))
val = torch_frontend.tensor([5.])
x[(0, 0)] = val
```

### Environment

Linux. 

### Ivy Version

Nightly

### Backend

- [ ] NumPy
- [ ] TensorFlow
- [ ] PyTorch
- [X] JAX

### Device

CPU


Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/jax/general.py b/ivy/functional/backends/jax/general.py
--- a/ivy/functional/backends/jax/general.py
+++ b/ivy/functional/backends/jax/general.py
@@ -58,8 +58,7 @@ def _mask_to_index(query, x):
             raise ivy.exceptions.IvyException("too many indices")
         elif not len(query.shape):
             query = jnp.tile(query, x.shape[0])
-    expected_shape = x[query].shape
-    return jnp.where(query), expected_shape
+    return jnp.where(query)
 
 
 def get_item(
@@ -75,7 +74,7 @@ def get_item(
                 return jnp.array([], dtype=x.dtype)
             else:
                 return jnp.expand_dims(x, 0)
-        query, _ = _mask_to_index(query, x)
+        query = _mask_to_index(query, x)
     elif isinstance(query, list):
         query = (query,)
     return x.__getitem__(query)
@@ -90,9 +89,10 @@ def set_item(
     copy: Optional[bool] = False,
 ) -> JaxArray:
     if ivy.is_array(query) and ivy.is_bool_dtype(query):
-        query, expected_shape = _mask_to_index(query, x)
-        if ivy.is_array(val):
-            val = _broadcast_to(val, expected_shape)._data
+        query = _mask_to_index(query, x)
+    expected_shape = x[query].shape
+    if ivy.is_array(val):
+        val = _broadcast_to(val, expected_shape)._data
     ret = x.at[query].set(val)
     if copy:
         return ret


Test patch:
Repository: ivy-llc/ivy

Issue:
Raise `TypeError` incase of invalid type
In the following function, `ValueError` is raised after excepting a `TypeError`
https://github.com/unifyai/ivy/blob/f057407029669edeaf1fc49b90883978e4f0c3aa/ivy/functional/backends/paddle/layers.py#L33-L36



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/layers.py b/ivy/functional/backends/paddle/layers.py
--- a/ivy/functional/backends/paddle/layers.py
+++ b/ivy/functional/backends/paddle/layers.py
@@ -30,10 +30,11 @@ def _convert_to_list(value, n, name="padding", _type=int):
     else:
         try:
             value_list = list(value)
-        except TypeError:
-            raise ValueError(
-                f"The input {name}'s type must be list or tuple. Received: {value}"
-            )
+        except TypeError as e:
+            raise TypeError(
+                f"The input {value}'s type must be list or tuple. Received:"
+                f" {type(value)}"
+            ) from e
         else:
             return value_list
 


Test patch:
Repository: ivy-llc/ivy

Issue:
Fix Ivy Failing Test: numpy - statistical.min



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/numpy/statistical.py b/ivy/functional/backends/numpy/statistical.py
--- a/ivy/functional/backends/numpy/statistical.py
+++ b/ivy/functional/backends/numpy/statistical.py
@@ -14,6 +14,7 @@
 # -------------------#
 
 
+@_scalar_output_to_0d_array
 def min(
     x: np.ndarray,
     /,
diff --git a/ivy/functional/backends/tensorflow/statistical.py b/ivy/functional/backends/tensorflow/statistical.py
--- a/ivy/functional/backends/tensorflow/statistical.py
+++ b/ivy/functional/backends/tensorflow/statistical.py
@@ -12,7 +12,9 @@
 # -------------------#
 
 
-@with_unsupported_dtypes({"2.15.0 and below": ("complex", "bool")}, backend_version)
+@with_unsupported_dtypes(
+    {"2.15.0 and below": ("complex", "bool", "uint64")}, backend_version
+)
 def min(
     x: Union[tf.Tensor, tf.Variable],
     /,


Test patch:
Repository: ivy-llc/ivy

Issue:
 Fix Ivy Failing Test: paddle - elementwise.add



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/elementwise.py b/ivy/functional/backends/paddle/elementwise.py
--- a/ivy/functional/backends/paddle/elementwise.py
+++ b/ivy/functional/backends/paddle/elementwise.py
@@ -28,7 +28,7 @@ def _elementwise_helper(x1, x2):
 
 
 @with_unsupported_dtypes(
-    {"2.5.2 and below": ("int8", "uint8", "float16", "bool", "bfloat16")},
+    {"2.5.2 and below": ("int8", "int16", "uint8", "float16", "bool", "bfloat16")},
     backend_version,
 )
 def add(


Test patch:
Repository: ivy-llc/ivy

Issue:
fixed the complex dtype issue at paddle.less_equel 



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/elementwise.py b/ivy/functional/backends/paddle/elementwise.py
--- a/ivy/functional/backends/paddle/elementwise.py
+++ b/ivy/functional/backends/paddle/elementwise.py
@@ -140,8 +140,8 @@ def equal(
     )
 
 
-@with_unsupported_dtypes(
-    {"2.6.0 and below": ("int8", "int16", "bfloat16", "unsigned", "float16")},
+@with_supported_dtypes(
+    {"2.6.0 and below": ("bool", "float32", "float64", "int32", "int64", "complex")},
     backend_version,
 )
 def less_equal(
@@ -153,7 +153,7 @@ def less_equal(
 ) -> paddle.Tensor:
     x1, x2, ret_dtype = _elementwise_helper(x1, x2)
     if paddle.is_complex(x1):
-        if paddle.is_complex(x1):
+        if paddle.is_complex(x2):
             real = paddle.less_equal(x1.real(), x2.real())
             imag = paddle.less_equal(x1.imag(), x2.imag())
             return paddle_backend.logical_and(real, imag)


Test patch:
Repository: ivy-llc/ivy

Issue:
Fix Ivy Failing Test: jax - elementwise.asinh



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/jax/elementwise.py b/ivy/functional/backends/jax/elementwise.py
--- a/ivy/functional/backends/jax/elementwise.py
+++ b/ivy/functional/backends/jax/elementwise.py
@@ -55,6 +55,7 @@ def asin(x: JaxArray, /, *, out: Optional[JaxArray] = None) -> JaxArray:
     return jnp.arcsin(x)
 
 
+@with_unsupported_dtypes({"0.4.23 and below": ("complex",)}, backend_version)
 def asinh(x: JaxArray, /, *, out: Optional[JaxArray] = None) -> JaxArray:
     return jnp.arcsinh(x)
 


Test patch:
Repository: ivy-llc/ivy

Issue:
Fixed complex dtype not supported at jax and troch backend



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/jax/elementwise.py b/ivy/functional/backends/jax/elementwise.py
--- a/ivy/functional/backends/jax/elementwise.py
+++ b/ivy/functional/backends/jax/elementwise.py
@@ -51,6 +51,7 @@ def add(
     return jnp.add(x1, x2)
 
 
+@with_unsupported_dtypes({"0.4.23 and below": ("complex",)}, backend_version)
 def asin(x: JaxArray, /, *, out: Optional[JaxArray] = None) -> JaxArray:
     return jnp.arcsin(x)
 
diff --git a/ivy/functional/backends/torch/elementwise.py b/ivy/functional/backends/torch/elementwise.py
--- a/ivy/functional/backends/torch/elementwise.py
+++ b/ivy/functional/backends/torch/elementwise.py
@@ -204,7 +204,7 @@ def fmin(
 fmin.support_native_out = True
 
 
-@with_unsupported_dtypes({"2.1.2 and below": ("float16",)}, backend_version)
+@with_unsupported_dtypes({"2.1.2 and below": ("complex",)}, backend_version)
 @handle_numpy_arrays_in_specific_backend
 def asin(x: torch.Tensor, /, *, out: Optional[torch.Tensor] = None) -> torch.Tensor:
     x = _cast_for_unary_op(x)


Test patch:
Repository: ivy-llc/ivy

Issue:
Fix Ivy Failing Test: torch - elementwise.acos



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/jax/elementwise.py b/ivy/functional/backends/jax/elementwise.py
--- a/ivy/functional/backends/jax/elementwise.py
+++ b/ivy/functional/backends/jax/elementwise.py
@@ -28,6 +28,7 @@ def abs(
     return jnp.where(x != 0, jnp.absolute(x), 0)
 
 
+@with_unsupported_dtypes({"0.4.23 and below": ("complex",)}, backend_version)
 def acos(x: JaxArray, /, *, out: Optional[JaxArray] = None) -> JaxArray:
     return jnp.arccos(x)
 
diff --git a/ivy/functional/backends/torch/elementwise.py b/ivy/functional/backends/torch/elementwise.py
--- a/ivy/functional/backends/torch/elementwise.py
+++ b/ivy/functional/backends/torch/elementwise.py
@@ -403,7 +403,7 @@ def greater_equal(
 greater_equal.support_native_out = True
 
 
-@with_unsupported_dtypes({"2.1.2 and below": ("float16",)}, backend_version)
+@with_unsupported_dtypes({"2.1.2 and below": ("complex",)}, backend_version)
 @handle_numpy_arrays_in_specific_backend
 def acos(x: torch.Tensor, /, *, out: Optional[torch.Tensor] = None) -> torch.Tensor:
     x = _cast_for_unary_op(x)


Test patch:
diff --git a/ivy_tests/test_ivy/test_functional/test_core/test_elementwise.py b/ivy_tests/test_ivy/test_functional/test_core/test_elementwise.py
--- a/ivy_tests/test_ivy/test_functional/test_core/test_elementwise.py
+++ b/ivy_tests/test_ivy/test_functional/test_core/test_elementwise.py
@@ -177,7 +177,7 @@ def test_abs(*, dtype_and_x, test_flags, backend_fw, fn_name, on_device):
 @handle_test(
     fn_tree="functional.ivy.acos",
     dtype_and_x=helpers.dtype_and_values(
-        available_dtypes=helpers.get_dtypes("valid"),
+        available_dtypes=helpers.get_dtypes("float_and_complex"),
         large_abs_safety_factor=4,
         small_abs_safety_factor=4,
         safety_factor_scale="log",
Repository: ivy-llc/ivy

Issue:
 Fix Ivy Failing Test: paddle - elementwise.exp2



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/elementwise.py b/ivy/functional/backends/paddle/elementwise.py
--- a/ivy/functional/backends/paddle/elementwise.py
+++ b/ivy/functional/backends/paddle/elementwise.py
@@ -974,6 +974,10 @@ def exp(x: paddle.Tensor, /, *, out: Optional[paddle.Tensor] = None) -> paddle.T
     return paddle.exp(x)
 
 
+@with_supported_dtypes(
+    {"2.6.0 and below": ("int32", "int64", "float32", "float64", "complex")},
+    backend_version,
+)
 def exp2(
     x: Union[paddle.Tensor, float, list, tuple],
     /,


Test patch:
Repository: ivy-llc/ivy

Issue:
Incorrectly passed arguments when raising `KeyError()`
In the following line, `path_type` is passed separately as an argument while raising `KeyError()`
https://github.com/unifyai/ivy/blob/e2a250393aea9f527466584a885c99c36cf9b1cb/ivy/functional/frontends/jax/numpy/mathematical_functions.py#L318
It should be raise `KeyError("Path name %s not found" % path_type)` for correct output.



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/mathematical_functions.py b/ivy/functional/frontends/jax/numpy/mathematical_functions.py
--- a/ivy/functional/frontends/jax/numpy/mathematical_functions.py
+++ b/ivy/functional/frontends/jax/numpy/mathematical_functions.py
@@ -315,7 +315,7 @@ def einsum_path(subscripts, *operands, optimize="greedy"):
     elif path_type == "optimal":
         path = optimal_path(input_sets, output_set, dimension_dict, memory_arg)
     else:
-        raise KeyError("Path name %s not found", path_type)
+        raise KeyError(f"Path name {path_type} not found")
 
     cost_list, scale_list, size_list, contraction_list = [], [], [], []
 


Test patch: