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

Issue:
unravel_index



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/indexing.py b/ivy/functional/frontends/jax/numpy/indexing.py
--- a/ivy/functional/frontends/jax/numpy/indexing.py
+++ b/ivy/functional/frontends/jax/numpy/indexing.py
@@ -44,3 +44,10 @@ def triu_indices_from(arr, k=0):
 
 def tril_indices_from(arr, k=0):
     return ivy.tril_indices(arr.shape[-2], arr.shape[-1], k)
+
+
+# unravel_index
+@to_ivy_arrays_and_back
+def unravel_index(indices, shape):
+    ret = [x.astype("int64") for x in ivy.unravel_index(indices, shape)]
+    return tuple(ret)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_indexing.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_indexing.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_indexing.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_indexing.py
@@ -293,3 +293,48 @@ def test_jax_numpy_tril_indices_from(
         arr=x[0],
         k=k,
     )
+
+
+# unravel_index
+@st.composite
+def max_value_as_shape_prod(draw):
+    shape = draw(
+        helpers.get_shape(
+            min_num_dims=1,
+            max_num_dims=5,
+            min_dim_size=1,
+            max_dim_size=5,
+        )
+    )
+    dtype_and_x = draw(
+        helpers.dtype_values_axis(
+            available_dtypes=["int32", "int64"],
+            min_value=0,
+            max_value=np.prod(shape) - 1,
+        )
+    )
+    return dtype_and_x, shape
+@handle_frontend_test(
+    fn_tree="jax.numpy.unravel_index",
+    dtype_x_shape=max_value_as_shape_prod(),
+    test_with_out=st.just(False),
+)
+def test_jax_numpy_unravel_index(
+    *,
+    dtype_x_shape,
+    test_flags,
+    frontend,
+    fn_tree,
+    on_device,
+):
+    dtype_and_x, shape = dtype_x_shape
+    input_dtype, x = dtype_and_x[0], dtype_and_x[1]
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        test_flags=test_flags,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        indices=x[0],
+        shape=shape,
+    )
Repository: ivy-llc/ivy

Issue:
unwrap



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/mathematical_functions/other_special_functions.py b/ivy/functional/frontends/numpy/mathematical_functions/other_special_functions.py
--- a/ivy/functional/frontends/numpy/mathematical_functions/other_special_functions.py
+++ b/ivy/functional/frontends/numpy/mathematical_functions/other_special_functions.py
@@ -0,0 +1,48 @@
+# global
+import ivy
+
+# local
+from ivy.functional.frontends.numpy.func_wrapper import (
+    to_ivy_arrays_and_back,
+    handle_numpy_dtype,
+    from_zero_dim_arrays_to_scalar,
+    handle_numpy_out,
+)
+
+
+
+@handle_numpy_out
+@handle_numpy_dtype
+@to_ivy_arrays_and_back
+@from_zero_dim_arrays_to_scalar
+def unwrap(p, discont=None, axis=-1, *, period=2*pi):
+    p = ivy.Array.asarray(p)
+    nd = p.ndim
+    dd = ivy.diff(p, axis=axis)
+    if discont is None:
+        discont = period/2
+    slice1 = [ivy.slice(None, None)]*nd     # full slices
+    slice1[axis] = ivy.slice(1, None)
+    slice1 = ivy.tuple(slice1)
+    dtype = ivy.result_type(dd, period)
+    if ivy.issubdtype(dtype, ivy.integer):
+        interval_high, rem = ivy.divmod(period, 2)
+        boundary_ambiguous = rem == 0
+    else:
+        interval_high = period / 2
+        boundary_ambiguous = True
+    interval_low = -interval_high
+    ddmod = ivy.mod(dd - interval_low, period) + interval_low
+    if boundary_ambiguous:
+        ivy.copyto(ddmod, interval_high,
+                   where=(ddmod == interval_low) & (dd > 0))
+    ph_correct = ddmod - dd
+    ivy.copyto(ph_correct, 0, where=ivy.abs(dd) < discont)
+    up = ivy.array(p, copy=True, dtype=dtype)
+    up[slice1] = p[slice1] + ph_correct.cumsum(axis)
+    return up
+
+my_list = [24,8,3,4,34,8]
+ans = unwrap(my_list)
+print("After the np.unwrap()")
+print(ans)
\ No newline at end of file


Test patch:
Repository: ivy-llc/ivy

Issue:
ediff1d



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/mathematical_functions/sums_products_differences.py b/ivy/functional/frontends/numpy/mathematical_functions/sums_products_differences.py
--- a/ivy/functional/frontends/numpy/mathematical_functions/sums_products_differences.py
+++ b/ivy/functional/frontends/numpy/mathematical_functions/sums_products_differences.py
@@ -138,3 +138,19 @@ def nancumsum(a, /, axis=None, dtype=None, out=None):
 @to_ivy_arrays_and_back
 def diff(x, /, *, n=1, axis=-1, prepend=None, append=None):
     return ivy.diff(x, n=n, axis=axis, prepend=prepend, append=append)
+
+
+@to_ivy_arrays_and_back
+def ediff1d(ary, to_end=None, to_begin=None):
+    diffs = ivy.diff(ary)
+    if to_begin is not None:
+        if not isinstance(to_begin, (list, tuple)):
+            to_begin = [to_begin]
+        to_begin = ivy.array(to_begin)
+        diffs = ivy.concat((to_begin, diffs))
+    if to_end is not None:
+        if not isinstance(to_end, (list, tuple)):
+            to_end = [to_end]
+        to_end = ivy.array(to_end)
+        diffs = ivy.concat((diffs, to_end))
+    return diffs


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_mathematical_functions/test_sums_products_differences.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_mathematical_functions/test_sums_products_differences.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_mathematical_functions/test_sums_products_differences.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_mathematical_functions/test_sums_products_differences.py
@@ -329,3 +329,37 @@ def test_numpy_diff(
         x=x[0],
         axis=axis,
     )
+    
+    
+# ediff1d
+@handle_frontend_test(
+    fn_tree="numpy.ediff1d",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"), 
+        min_num_dims=1, 
+        max_num_dims=1
+    ),
+    to_end=st.one_of(st.integers(-1, 10), st.lists(st.integers(-1, 10), min_size=1, max_size=10)),
+    to_begin=st.one_of(st.integers(-1, 10), st.lists(st.integers(-1, 10), min_size=1, max_size=10)),
+)
+def test_numpy_ediff1d(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    to_end,
+    to_begin,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_flags=test_flags,
+        ary=x[0],
+        to_end=to_end,
+        to_begin=to_begin,
+    )
Repository: ivy-llc/ivy

Issue:
standard_gamma



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/random/functions.py b/ivy/functional/frontends/numpy/random/functions.py
--- a/ivy/functional/frontends/numpy/random/functions.py
+++ b/ivy/functional/frontends/numpy/random/functions.py
@@ -89,3 +89,9 @@ def shuffle(x, /):
 @from_zero_dim_arrays_to_scalar
 def standard_normal(size=None):
     return ivy.random_normal(mean=0.0, std=1.0, shape=size, dtype="float64")
+
+
+@to_ivy_arrays_and_back
+@from_zero_dim_arrays_to_scalar
+def standard_gamma(alpha):
+    return ivy.gamma(alpha, beta=1.0, dtype="float64")


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
@@ -349,3 +349,32 @@ def test_numpy_standard_normal(
         test_values=False,
         size=size,
     )
+
+    
+@handle_frontend_test(
+    fn_tree="numpy.random.standard_gamma",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        shape=st.tuples(st.integers(min_value=1, max_value=2)),
+        min_value=1,
+        max_value=100,
+    ),
+    test_with_out=st.just(False),
+)
+def test_numpy_standard_gamma(
+        dtype_and_x,
+        frontend,
+        test_flags,
+        fn_tree,
+        on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        test_flags=test_flags,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        alpha=x[0],
+        test_values=False,
+    )
Repository: ivy-llc/ivy

Issue:
normal



Discussion:
Can you please tell me what exactly I have to do, to solve this issue? @adityagandhamal 
> Can you please tell me what exactly I have to do, to solve this issue? @adityagandhamal

Go through the [documentation](https://lets-unify.ai/ivy/overview/contributing/the_basics.html#todo-list-issues) for contribution. This issue has already been claimed. You can find how to claim issues in the documentation.

Resolving patch:
diff --git a/ivy/functional/frontends/torch/random_sampling.py b/ivy/functional/frontends/torch/random_sampling.py
--- a/ivy/functional/frontends/torch/random_sampling.py
+++ b/ivy/functional/frontends/torch/random_sampling.py
@@ -76,6 +76,20 @@ def rand(
     )
 
 
+@with_supported_dtypes(
+    {
+        "1.11.0 and below": (
+            "float32",
+            "float64",
+        )
+    },
+    "torch",
+)
+@to_ivy_arrays_and_back
+def normal(mean, std, *, generator=None, out=None):
+    return ivy.random_normal(mean=mean, std=std, out=out)
+    
+
 @to_ivy_arrays_and_back
 def rand_like(
     input,


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
@@ -164,6 +164,62 @@ def call():
         assert u.shape == v.shape
 
 
+@handle_frontend_test(
+    fn_tree="torch.normal",
+    dtype_and_mean=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_value=-1000,
+        max_value=1000,
+        min_num_dims=1,
+        max_num_dims=5,
+        min_dim_size=2,
+    ),
+    dtype_and_std=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_value=0,
+        max_value=1000,
+        min_num_dims=1,
+        max_num_dims=5,
+        min_dim_size=2,
+    ),
+)
+def test_torch_normal(
+    *,
+    dtype_and_mean,
+    dtype_and_std,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    mean_dtype, mean = dtype_and_mean
+    _, std = dtype_and_std
+    
+    def call():
+        return helpers.test_frontend_function(
+            input_dtypes=mean_dtype,
+            frontend=frontend,
+            test_flags=test_flags,
+            fn_tree=fn_tree,
+            on_device=on_device,
+            test_values=False,
+            mean=mean[0],
+            std=std[0],
+        )
+
+    ret = call()
+
+    if not ivy.exists(ret):
+        return
+      
+    ret_np, ret_from_np = ret
+    ret_np = helpers.flatten_and_to_np(ret=ret_np)
+    ret_from_np = helpers.flatten_and_to_np(ret=ret_from_np)
+    for (u, v) in zip(ret_np, ret_from_np):
+        assert u.dtype == v.dtype
+        assert u.shape == v.shape
+
+             
 @handle_frontend_test(
     fn_tree="torch.rand_like",
     dtype=helpers.get_dtypes("float", full=False),
Repository: ivy-llc/ivy

Issue:
hamming



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/manipulations.py b/ivy/functional/frontends/jax/numpy/manipulations.py
--- a/ivy/functional/frontends/jax/numpy/manipulations.py
+++ b/ivy/functional/frontends/jax/numpy/manipulations.py
@@ -248,3 +248,12 @@ def row_stack(tup):
             xs += [ivy.reshape(t, (1, ivy.shape(t)[0]))]
         return ivy.concat(xs, axis=0)
     return ivy.concat(tup, axis=0)
+
+
+@to_ivy_arrays_and_back
+def hamming(M):
+    if M <= 1:
+        return ivy.ones([M], dtype=ivy.float64)
+    n = ivy.arange(M)
+    ret = 0.54 - 0.46 * ivy.cos(2.0 * ivy.pi * n / (M - 1))
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
@@ -1450,3 +1450,25 @@ def test_jax_numpy_row_stack(
         on_device=on_device,
         tup=xs,
     )
+
+
+# hamming
+@handle_frontend_test(
+    fn_tree="jax.numpy.hamming",
+    m=helpers.ints(min_value=0,max_value=20),
+)
+def test_jax_numpy_hamming(
+    m,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=["int64"],
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        M=m,
+    )
Repository: ivy-llc/ivy

Issue:
hanning



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/manipulations.py b/ivy/functional/frontends/jax/numpy/manipulations.py
--- a/ivy/functional/frontends/jax/numpy/manipulations.py
+++ b/ivy/functional/frontends/jax/numpy/manipulations.py
@@ -257,3 +257,12 @@ def hamming(M):
     n = ivy.arange(M)
     ret = 0.54 - 0.46 * ivy.cos(2.0 * ivy.pi * n / (M - 1))
     return ret
+
+
+@to_ivy_arrays_and_back
+def hanning(M):
+    if M <= 1:
+        return ivy.ones([M], dtype=ivy.float64)
+    n = ivy.arange(M)
+    ret = 0.5 * (1 - ivy.cos(2.0 * ivy.pi * n / (M - 1)))
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
@@ -1455,7 +1455,7 @@ def test_jax_numpy_row_stack(
 # hamming
 @handle_frontend_test(
     fn_tree="jax.numpy.hamming",
-    m=helpers.ints(min_value=0,max_value=20),
+    m=helpers.ints(min_value=0, max_value=20),
 )
 def test_jax_numpy_hamming(
     m,
@@ -1472,3 +1472,25 @@ def test_jax_numpy_hamming(
         on_device=on_device,
         M=m,
     )
+
+
+# hanning
+@handle_frontend_test(
+    fn_tree="jax.numpy.hanning",
+    m=helpers.ints(min_value=0, max_value=20),
+)
+def test_jax_numpy_hanning(
+    m,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=["int64"],
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        M=m,
+    )
Repository: ivy-llc/ivy

Issue:
imag



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/pointwise_ops.py b/ivy/functional/frontends/torch/pointwise_ops.py
--- a/ivy/functional/frontends/torch/pointwise_ops.py
+++ b/ivy/functional/frontends/torch/pointwise_ops.py
@@ -487,3 +487,8 @@ def nextafter(input, *, out=None):
 @to_ivy_arrays_and_back
 def fmod(x1, x2, out=None):
     return ivy.fmod(x1, x2, out=out)
+
+
+@to_ivy_arrays_and_back
+def imag(input):
+    return ivy.imag(input)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py
@@ -2278,3 +2278,29 @@ def test_torch_fmod(
         x1=x[0],
         x2=x[1],
     )
+
+
+# imag
+@handle_frontend_test(
+    fn_tree="torch.imag",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("complex"),
+    ),
+)
+def test_torch_imag(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, input = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        input=input[0],
+    )
Repository: ivy-llc/ivy

Issue:
logical_or



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -287,6 +287,9 @@ def abs_(self):
     def logical_and(self, other):
         return torch_frontend.logical_and(self._ivy_array, other)
 
+    def logical_or(self, other):
+        return torch_frontend.logical_or(self._ivy_array, other)
+
     def bitwise_not(self, *, out=None):
         return torch_frontend.bitwise_not(self._ivy_array)
 


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
@@ -3033,6 +3033,42 @@ def test_torch_instance_logical_and(
     )
 
 
+# logical_or
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="logical_or",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("bool", "integer"),
+        num_arrays=2,
+    ),
+)
+def test_torch_instance_logical_or(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "data": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={
+            "other": x[1],
+        },
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        on_device=on_device,
+    )
+
+
 # bitwise_not
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
tri



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/manipulations.py b/ivy/functional/frontends/jax/numpy/manipulations.py
--- a/ivy/functional/frontends/jax/numpy/manipulations.py
+++ b/ivy/functional/frontends/jax/numpy/manipulations.py
@@ -276,3 +276,12 @@ def kaiser(M, beta):
     alpha = 0.5 * (M - 1)
     ret = ivy.i0(beta * ivy.sqrt(1 - ((n - alpha) / alpha) ** 2)) / ivy.i0(beta)
     return ret
+
+
+@handle_jax_dtype
+@to_ivy_arrays_and_back
+def tri(N, M=None, k=0, dtype="float64"):
+    if M is None:
+        M = N
+    ones = ivy.ones((N, M), dtype=dtype)
+    return ivy.tril(ones, k=k)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_manipulation.py
@@ -1520,3 +1520,35 @@ def test_jax_numpy_kaiser(
         M=m,
         beta=beta,
     )
+
+
+# tri
+@handle_frontend_test(
+    fn_tree="jax.numpy.tri",
+    rows=helpers.ints(min_value=3, max_value=10),
+    cols=helpers.ints(min_value=3, max_value=10),
+    k=helpers.ints(min_value=-10, max_value=10),
+    dtype=helpers.get_dtypes("valid", full=False),
+    test_with_out=st.just(False),
+)
+def test_jax_numpy_tri(
+    rows,
+    cols,
+    k,
+    dtype,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        N=rows,
+        M=cols,
+        k=k,
+        dtype=dtype[0],
+    )
Repository: ivy-llc/ivy

Issue:
ravel



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -465,6 +465,9 @@ def unsqueeze_(self, dim):
         self._ivy_array = self.unsqueeze(dim).ivy_array
         return self
 
+    def ravel(self):
+        return torch_frontend.ravel(self)
+
     def split(self, split_size, dim=0):
         return torch_frontend.split(self, split_size, dim)
 


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
@@ -2250,6 +2250,40 @@ def test_torch_instance_unsqueeze_(
     )
 
 
+# ravel
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="ravel",
+    dtype_value=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        shape=st.shared(helpers.get_shape(min_num_dims=1), key="shape"),
+    ),
+)
+def test_torch_instance_ravel(
+    dtype_value,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+):
+    input_dtype, x = dtype_value
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "data": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        on_device=on_device,
+    )
+
+
 # split
 @handle_frontend_method(
     class_tree=CLASS_TREE,