Skip to content

Commit 4527c3a

Browse files
add floor and ceil with same return dtype
1 parent 603c852 commit 4527c3a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: array_api_compat/paddle/_aliases.py

+8
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,14 @@ def asarray(
11371137
return obj
11381138

11391139

1140+
def floor(x: array, /) -> array:
1141+
return paddle.floor(x).to(x.dtype)
1142+
1143+
1144+
def ceil(x: array, /) -> array:
1145+
return paddle.ceil(x).to(x.dtype)
1146+
1147+
11401148
def clip(
11411149
x: array,
11421150
/,

0 commit comments

Comments
 (0)