8000 CI: Upgrade `array-api-tests` hash · numpy/numpy@785e4d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 785e4d7

Browse files
committed
CI: Upgrade array-api-tests hash
1 parent 50bd355 commit 785e4d7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
uses: actions/checkout@v4
233233
with:
234234
repository: data-apis/array-api-tests
235-
ref: '809a1984414cfc0bca68a823aeaeba7df3900d17' # Latest commit as of 2024-06-26
235+
ref: '827edd804bcace9d64176b8115138d29ae3e8dec' # Latest commit as of 2024-07-30
236236
submodules: 'true'
237237
path: 'array-api-tests'
238238
- name: Set up Python
@@ -253,7 +253,7 @@ jobs:
253253
PYTHONWARNINGS: 'ignore::UserWarning::,ignore::DeprecationWarning::,ignore::RuntimeWarning::'
254254
run: |
255255
cd ${GITHUB_WORKSPACE}/array-api-tests
256-
pytest array_api_tests -v -c pytest.ini --ci --max-examples=2 --derandomize --disable-deadline --skips-file ${GITHUB_WORKSPACE}/tools/ci/array-api-skips.txt
256+
pytest array_api_tests -v -c pytest.ini --ci --max-examples=50 --derandomize --disable-deadline --xfails-file ${GITHUB_WORKSPACE}/tools/ci/array-api-xfails.txt
257257
258258
custom_checks:
259259
needs: [smoke_test]

numpy/_core/numeric.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,9 +2684,10 @@ def astype(x, dtype, /, *, copy=True, device=None):
26842684
True
26852685
26862686
"""
2687-
if not isinstance(x, np.ndarray):
2687+
if not (isinstance(x, np.ndarray) or isscalar(x)):
26882688
raise TypeError(
2689-
f"Input should be a NumPy array. It is a {type(x)} instead."
2689+
f"Input should be a NumPy array or scalar. "
2690+
"It is a {type(x)} instead."
26902691
)
26912692
if device is not None and device != "cpu":
26922693
raise ValueError(

tools/ci/array-api-skips.txt renamed to tools/ci/array-api-xfails.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ array_api_tests/test_signatures.py::test_func_signature[reshape]
77
# 'min/max' args are present. 'a_min/a_max' are retained for backward compat.
88
array_api_tests/test_signatures.py::test_func_signature[clip]
99

10-
# missing 'descending' keyword arguments
10+
# missing 'descending' keyword argument
1111
array_api_tests/test_signatures.py::test_func_signature[argsort]
1212
array_api_tests/test_signatures.py::test_func_signature[sort]
1313

14+
# missing 'descending' keyword argument
15+
array_api_tests/test_sorting_functions.py::test_argsort
16+
array_api_tests/test_sorting_functions.py::test_sort
17+
1418
# ufuncs signature on linux is always <Signature (*args, **kwargs)>
1519
# np.vecdot is the only ufunc with a keyword argument which causes a failure
1620
array_api_tests/test_signatures.py::test_func_signature[vecdot]

0 commit comments

Comments
 (0)
0