Skip to content

Commit 8cce9f2

Browse files
Change to .asarray
Co-authored-by: Lucas Colley <[email protected]>
1 parent 9053822 commit 8cce9f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array_api_extra/_delegation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def nan_to_num(
162162
-1.7976931348623157e+308
163163
>>> xpx.nan_to_num(xp.nan)
164164
0.0
165-
>>> x = xp.array([xp.inf, -xp.inf, xp.nan, -128, 128])
165+
>>> x = xp.asarray([xp.inf, -xp.inf, xp.nan, -128, 128])
166166
>>> xpx.nan_to_num(x)
167167
array([ 1.79769313e+308, -1.79769313e+308, 0.00000000e+000, # may vary
168168
-1.28000000e+002, 1.28000000e+002])

0 commit comments

Comments
 (0)