From 047030816cfe26d4424c80f4eaf6680ca7c2dd3d Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Mon, 23 Mar 2026 19:22:08 +0100 Subject: [PATCH] ENH: allow copy= in from_dlpack --- array_api_strict/_creation_functions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/array_api_strict/_creation_functions.py b/array_api_strict/_creation_functions.py index af4fa6e..f8894c0 100644 --- a/array_api_strict/_creation_functions.py +++ b/array_api_strict/_creation_functions.py @@ -212,15 +212,12 @@ def from_dlpack( if copy is not _undef: raise ValueError("The copy argument to from_dlpack requires at least version 2023.12 of the array API") - # Going to wait for upstream numpy support if device is not _undef: _check_device(device) else: device = None - if copy not in [_undef, None]: - raise NotImplementedError("The copy argument to from_dlpack is not yet implemented") - return Array._new(np.from_dlpack(x), device=device) + return Array._new(np.from_dlpack(x, copy=copy), device=device) def full(