From b2389e068f59442e711ce07427b3eafd3a89cf1e Mon Sep 17 00:00:00 2001 From: Bhushan Srivastava <59949692+he11owthere@users.noreply.github.com> Date: Sun, 24 Dec 2023 01:20:31 +0530 Subject: [PATCH] fixed expm1 method in the PyTorch frontend (#21745) Co-authored-by: NripeshN --- ivy/functional/frontends/torch/tensor.py | 4 ++-- ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py index 46f95c5ec0641..c825718d8a2e9 100644 --- a/ivy/functional/frontends/torch/tensor.py +++ b/ivy/functional/frontends/torch/tensor.py @@ -1386,8 +1386,8 @@ def cov(self, /, *, correction=1, fweights=None, aweights=None): def exp(self): return torch_frontend.exp(self) - @with_unsupported_dtypes( - {"2.1.2 and below": ("bfloat16", "float16", "complex")}, "torch" + @with_supported_dtypes( + {"2.1.2 and below": ("bfloat16", "float32", "float64")}, "torch" ) def expm1(self): return torch_frontend.expm1(self) 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 index ab4c97560d58c..4c525a69e0c52 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py @@ -6533,7 +6533,7 @@ def test_torch_expand_as( init_tree="torch.tensor", method_name="expm1", dtype_and_x=helpers.dtype_and_values( - available_dtypes=helpers.get_dtypes("numeric"), + available_dtypes=helpers.get_dtypes("valid"), ), ) def test_torch_expm1(