From 0af909e326df6cb2235721eaffb9ca2b008365ae Mon Sep 17 00:00:00 2001 From: Haris Mahmood Date: Thu, 29 Aug 2024 23:49:43 +0500 Subject: [PATCH] fix: Fixed the API for torch.std and torch.std_mean --- ivy/functional/frontends/torch/reduction_ops.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ivy/functional/frontends/torch/reduction_ops.py b/ivy/functional/frontends/torch/reduction_ops.py index f187f0525c0b..fe5dc5d06eb9 100644 --- a/ivy/functional/frontends/torch/reduction_ops.py +++ b/ivy/functional/frontends/torch/reduction_ops.py @@ -335,16 +335,18 @@ def quantile(input, q, dim=None, keepdim=False, *, interpolation="linear", out=N @numpy_to_torch_style_args @to_ivy_arrays_and_back @with_unsupported_dtypes({"2.2 and below": ("float16", "bool", "integer")}, "torch") -def std(input, dim=None, unbiased=True, keepdim=False, *, out=None): - return ivy.std(input, axis=dim, correction=int(unbiased), keepdims=keepdim, out=out) +def std(input, dim=None, *, correction=1, keepdim=False, out=None): + return ivy.std( + input, axis=dim, correction=int(correction), keepdims=keepdim, out=out + ) @numpy_to_torch_style_args @to_ivy_arrays_and_back @with_unsupported_dtypes({"2.2 and below": ("bfloat16",)}, "torch") -def std_mean(input, dim, unbiased, keepdim=False, *, out=None): +def std_mean(input, dim, *, correction=1, keepdim=False, out=None): temp_std = ivy.std( - input, axis=dim, correction=int(unbiased), keepdims=keepdim, out=out + input, axis=dim, correction=int(correction), keepdims=keepdim, out=out ) temp_mean = ivy.mean(input, axis=dim, keepdims=keepdim, out=out) return temp_std, temp_mean