Skip to content

Commit

Permalink
fix paddle.nanmedian frontend function (#23578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mghrabi committed Sep 18, 2023
1 parent 200255b commit cc0e4ea
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ivy/functional/frontends/paddle/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,12 @@ def median(x, axis=None, keepdim=False, name=None):


@with_supported_dtypes(
{"2.5.0 and below": ("float16", "float32", "float64", "uint16")},
{"2.5.0 and below": ("float16", "float32", "float64", "int32", "int64")},
"paddle",
)
@to_ivy_arrays_and_back
def nanmedian(x, axis=None, keepdim=True, name=None):
x = (
ivy.astype(x, ivy.float64)
if ivy.dtype(x) == "float64"
else ivy.astype(x, ivy.float32)
)
return ivy.median(x, axis=axis, keepdims=keepdim)
return ivy.nanmedian(x, axis=axis, keepdims=keepdim)


@with_unsupported_dtypes({"2.5.1 and below": ("complex", "int8")}, "paddle")
Expand Down

0 comments on commit cc0e4ea

Please sign in to comment.