Skip to content

ENH: testing: support 0-D arrays for rtol and atol #2215

ENH: testing: support 0-D arrays for rtol and atol

ENH: testing: support 0-D arrays for rtol and atol #2215

Triggered via pull request May 16, 2026 21:52
Status Failure
Total duration 3m 55s
Artifacts

ci.yml

on: pull_request
Matrix: checks
Fit to window
Zoom out
Zoom in

Annotations

12 errors
Lint
Process completed with exit code 1.
Lint
8 errors
Lint: src/array_api_extra/_lib/_testing.py#L308
Argument of type "float | Array" cannot be assigned to parameter "atol" of type "float" in function "assert_allclose"   Type "float | Array" is not assignable to type "float"     "Array" is not assignable to "float" (reportArgumentType)
Lint: src/array_api_extra/_lib/_testing.py#L298
"ndim" is not a known attribute of "None" (reportOptionalMemberAccess)
Lint: src/array_api_extra/_lib/_testing.py#L298
Cannot access attribute "ndim" for class "float"   Attribute "ndim" is unknown (reportAttributeAccessIssue)
Lint: src/array_api_extra/_lib/_testing.py#L297
Argument of type "float | Array | None" cannot be assigned to parameter "array" of type "Array" in function "as_numpy_array"   Type "float | Array | None" is not assignable to type "Array"     "float" is incompatible with protocol "Array"       "__invert__" is not present       "__matmul__" is not present       "__and__" is not present       "__or__" is not present       "__xor__" is not present       "__lshift__" is not present ... (reportArgumentType)
Lint: src/array_api_extra/_lib/_testing.py#L297
Type "NDArray[Any]" is not assignable to declared type "float | Array | None"   Type "NDArray[Any]" is not assignable to type "float | Array | None"     "ndarray[_AnyShape, dtype[Any]]" is not assignable to "float"     "ndarray[_AnyShape, dtype[Any]]" is incompatible with protocol "Array"       Could not bind method "__add__" because "ndarray[_AnyShape, dtype[Any]]" is not assignable to parameter "self"         "ndarray[_AnyShape, dtype[Any]]" is not assignable to "ndarray[Any, StringDType[Never]]"           Type parameter "_DTypeT_co@ndarray" is covariant, but "dtype[Any]" is not a subtype of "StringDType[Never]"       "__lt__" is an incompatible type         No overloaded function matches type "(other: Array | complex, /) -> Array" ... (reportAssignmentType)
Lint: src/array_api_extra/_lib/_testing.py#L292
Cannot access attribute "ndim" for class "float"   Attribute "ndim" is unknown (reportAttributeAccessIssue)
Lint: src/array_api_extra/_lib/_testing.py#L291
Argument of type "float | Array" cannot be assigned to parameter "array" of type "Array" in function "as_numpy_array"   Type "float | Array" is not assignable to type "Array"     "float" is incompatible with protocol "Array"       "__invert__" is not present       "__matmul__" is not present       "__and__" is not present       "__or__" is not present       "__xor__" is not present       "__lshift__" is not present ... (reportArgumentType)
Lint: src/array_api_extra/_lib/_testing.py#L291
Type "NDArray[Any]" is not assignable to declared type "float | Array"   Type "NDArray[Any]" is not assignable to type "float | Array"     "ndarray[_AnyShape, dtype[Any]]" is not assignable to "float"     "ndarray[_AnyShape, dtype[Any]]" is incompatible with protocol "Array"       Could not bind method "__add__" because "ndarray[_AnyShape, dtype[Any]]" is not assignable to parameter "self"         "ndarray[_AnyShape, dtype[Any]]" is not assignable to "ndarray[Any, StringDType[Never]]"           Type parameter "_DTypeT_co@ndarray" is covariant, but "dtype[Any]" is not a subtype of "StringDType[Never]"       "__lt__" is an incompatible type         No overloaded function matches type "(other: Array | complex, /) -> Array" ... (reportAssignmentType)
Test tests-backends
Process completed with exit code 1.
Test tests-backends-py311
Process completed with exit code 1.