From af7607349167552c668d2616dae01c983e31ba34 Mon Sep 17 00:00:00 2001 From: fbourgey Date: Sun, 12 Apr 2026 12:06:39 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20Array=20API=20specificatio?= =?UTF-8?q?n=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: