summaryrefslogtreecommitdiff
path: root/numpy/_array_api
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/_array_api')
-rw-r--r--numpy/_array_api/_creation_functions.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/_array_api/_creation_functions.py b/numpy/_array_api/_creation_functions.py
index d015734ff..bd607234d 100644
--- a/numpy/_array_api/_creation_functions.py
+++ b/numpy/_array_api/_creation_functions.py
@@ -14,7 +14,10 @@ def asarray(obj: Union[float, NestedSequence[bool|int|float], SupportsDLPack, Su
if device is not None:
# Note: Device support is not yet implemented on ndarray
raise NotImplementedError("Device support is not yet implemented")
- return np.asarray(obj, dtype=dtype, copy=copy)
+ if copy is not None:
+ # Note: copy is not yet implemented in np.asarray
+ raise NotImplementedError("The copy keyword argument to asarray is not yet implemented")
+ return np.asarray(obj, dtype=dtype)
def arange(start: Union[int, float], /, *, stop: Optional[Union[int, float]] = None, step: Union[int, float] = 1, dtype: Optional[dtype] = None, device: Optional[device] = None) -> array:
"""