Skip to content

Commit 126fca0

Browse files
committed
.
1 parent 4bcf0dd commit 126fca0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

array_api_compat/numpy/_aliases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ def floor(x: Array, /) -> Array:
159159

160160

161161
# https://github.com/numpy/numpy/issues/29124
162-
def round(x: Array, /) -> Array:
162+
def trunc(x: Array, /) -> Array:
163163
if np.issubdtype(x.dtype, np.integer):
164164
if np.__version__ < '2':
165165
return x
166-
return np.round(x)
166+
return np.trunc(x)
167167

168168

169169
# These functions are completely new here. If the library already has them
@@ -196,7 +196,7 @@ def round(x: Array, /) -> Array:
196196
"atanh",
197197
"ceil",
198198
"floor",
199-
"round",
199+
"trunc",
200200
"bitwise_left_shift",
201201
"bitwise_invert",
202202
"bitwise_right_shift",

0 commit comments

Comments
 (0)