Skip to content

Commit 8dc3349

Browse files
committed
.
1 parent 0470308 commit 8dc3349

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

array_api_strict/_creation_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ def from_dlpack(
216216
_check_device(device)
217217
else:
218218
device = None
219+
if copy in [_undef, None]:
220+
# numpy 1.26 does not have the copy= arg
221+
return Array._new(np.from_dlpack(x), device=device)
219222

220223
return Array._new(np.from_dlpack(x, copy=copy), device=device)
221224

0 commit comments

Comments
 (0)