Open oleksandr-pavlyk opened 1 year ago
xp.nonzero is documented in the spec to require an exception for 0d arrays:
xp.nonzero
x (array) – input array. Must have a positive rank. If x is zero-dimensional, the function must raise an exception.
Yet the code exercises xp.nonzero for zero-dimensional arrays and expects the function to returns a tuple of size 1: https://github.com/data-apis/array-api-tests/blob/f82c7bc8627cc2c3a44fa3e425f53a253a609aa8/array_api_tests/test_searching_functions.py#L93-L98
This discrepancy should be fixed, or the spec modified.
xp.nonzero
is documented in the spec to require an exception for 0d arrays:Yet the code exercises
xp.nonzero
for zero-dimensional arrays and expects the function to returns a tuple of size 1: https://github.com/data-apis/array-api-tests/blob/f82c7bc8627cc2c3a44fa3e425f53a253a609aa8/array_api_tests/test_searching_functions.py#L93-L98This discrepancy should be fixed, or the spec modified.