Merge pull request #18870 from jakevdp:array-api-tests

PiperOrigin-RevId: 589184048
This commit is contained in:
jax authors 2023-12-08 10:58:23 -08:00
commit e686ed7e93
3 changed files with 3 additions and 4 deletions

View File

@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: data-apis/array-api-tests
ref: 'd264bad87c9448d22809aa84796b136dc75b0f81' # Latest commit as of 2023-11-27
ref: '7c89cf1a42eb18d4fadecda1cac8769d0138753c' # Latest commit as of 2023-12-07
submodules: 'true'
path: 'array-api-tests'
- name: Set up Python ${{ matrix.python-version }}

View File

@ -28,6 +28,8 @@ def argmin(x, /, *, axis=None, keepdims=False):
def nonzero(x, /):
"""Returns the indices of the array elements which are non-zero."""
if jax.numpy.ndim(x) == 0:
raise ValueError("inputs to nonzero() must have at least one dimension.")
return jax.numpy.nonzero(x)

View File

@ -3,9 +3,6 @@
# JAX doesn't yet support scalar boolean indexing
array_api_tests/test_array_object.py::test_getitem_masking
# Hypothesis warning
array_api_tests/meta/test_hypothesis_helpers.py::test_symmetric_matrices
# Test suite attempts in-place mutation:
array_api_tests/test_special_cases.py::test_binary
array_api_tests/test_special_cases.py::test_iop