From af7607349167552c668d2616dae01c983e31ba34 Mon Sep 17 00:00:00 2001 From: fbourgey Date: Sun, 12 Apr 2026 12:06:39 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20Add=20Array=20API=20specific?= =?UTF-8?q?ation=20link=20to=20HasArrayNamespace=20and=20Array=20protocols?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/array_api_typing/_array.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/array_api_typing/_array.py b/src/array_api_typing/_array.py index f4614f2..f02be0c 100644 --- a/src/array_api_typing/_array.py +++ b/src/array_api_typing/_array.py @@ -14,6 +14,8 @@ class HasArrayNamespace(Protocol[NamespaceT_co]): """Protocol for classes that have an `__array_namespace__` method. + See the Array API specification: https://data-apis.org/array-api/latest/ + This `Protocol` is intended for use in static typing to ensure that an object has an `__array_namespace__` method that returns a namespace for array operations. This `Protocol` should not be used at runtime for type @@ -76,6 +78,8 @@ class Array( ): """Array API specification for array object attributes and methods. + See the Array API specification: https://data-apis.org/array-api/latest/ + The type is: ``Array[+DTypeT, +NamespaceT = ModuleType] = Array[DTypeT, NamespaceT]`` where: From eb9072750067db7d80ff41ec4a051563a9ed0bfc Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Fri, 26 Jun 2026 21:59:17 +0100 Subject: [PATCH 2/2] Update src/array_api_typing/_array.py Signed-off-by: Lucas Colley --- src/array_api_typing/_array.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/array_api_typing/_array.py b/src/array_api_typing/_array.py index f02be0c..96073c7 100644 --- a/src/array_api_typing/_array.py +++ b/src/array_api_typing/_array.py @@ -14,8 +14,6 @@ class HasArrayNamespace(Protocol[NamespaceT_co]): """Protocol for classes that have an `__array_namespace__` method. - See the Array API specification: https://data-apis.org/array-api/latest/ - This `Protocol` is intended for use in static typing to ensure that an object has an `__array_namespace__` method that returns a namespace for array operations. This `Protocol` should not be used at runtime for type