Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions array_api_strict/_creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading