From f20be6ad3239a2e7a611ad42c9b36df7863e9883 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 19 Jul 2021 17:25:02 -0600 Subject: Start adding tests for the array API submodule The tests for the module will mostly focus on those things that aren't already tested by the official array API test suite (https://github.com/data-apis/array-api-tests). Currently, indexing tests are added, which test that the Array object correctly rejects otherwise valid indices that are not required by the array API spec. --- numpy/_array_api/_array_object.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'numpy/_array_api/_array_object.py') diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py index 4e3c7b344..54280ef37 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -158,7 +158,9 @@ class Array: allowed by NumPy but not required by the array API specification. We always raise ``IndexError`` on such indices (the spec does not require any specific behavior on them, but this makes the NumPy array API - namespace a minimal implementation of the spec). + namespace a minimal implementation of the spec). See + https://data-apis.org/array-api/latest/API_specification/indexing.html + for the full list of required indexing behavior This function either raises IndexError if the index ``key`` is invalid, or a new key to be used in place of ``key`` in indexing. It -- cgit v1.2.1