Skip to content

Commit c4bab35

Browse files
committed
....
1 parent c93abba commit c4bab35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_compat/numpy/_aliases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ def take_along_axis(x: Array, indices: Array, /, *, axis: int = -1):
147147
def ceil(x: Array, /) -> Array:
148148
if np.issubdtype(x.dtype, np.integer):
149149
if np.__version__ < '2':
150-
return x
150+
return x.copy()
151151
return np.ceil(x)
152152

153153

154154
def floor(x: Array, /) -> Array:
155155
if np.issubdtype(x.dtype, np.integer):
156156
if np.__version__ < '2':
157-
return x
157+
return x.copy()
158158
return np.floor(x)
159159

160160

0 commit comments

Comments
 (0)