From c1cdabf4709eaae2d80fca3dfce9318021647111 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 28 Mar 2025 10:20:07 +0100 Subject: [PATCH] DOC: clarify that nested asarray is unspecified --- src/array_api_stubs/_draft/creation_functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/array_api_stubs/_draft/creation_functions.py b/src/array_api_stubs/_draft/creation_functions.py index c09800783..8ebdc4e62 100644 --- a/src/array_api_stubs/_draft/creation_functions.py +++ b/src/array_api_stubs/_draft/creation_functions.py @@ -90,6 +90,10 @@ def asarray( An object supporting the buffer protocol can be turned into a memoryview through ``memoryview(obj)``. + .. note:: + If ``obj`` is a sequence with some elements being arrays, the behavior is unspecified and thus implementation-defined. Conforming + implentations may perform the conversion or raise an error. + dtype: Optional[dtype] output array data type. If ``dtype`` is ``None``, the output array data type must be inferred from the data type(s) in ``obj``. If all input values are Python scalars, then, in order of precedence,