Running the array-api-strict backend surfaces a test-suite defect: raw np.zeros_like called on backend-aware fixture arrays.
CCDPROC_ARRAY_LIBRARY=array-api-strict pytest \
ccdproc/tests/test_ccdproc_logging.py ccdproc/tests/test_image_collection.py -q
# 1 failed, 85 passed
ccdproc/tests/test_ccdproc_logging.py:75:
bias = CCDData(np.zeros_like(ccd_data.data), unit="adu")
RuntimeError: Can't convert array on the 'array_api_strict.Device('device1')'
device to a NumPy array.
Root cause: test_implicit_logging builds its CCDData via the shared ccd_data_func() fixture (ccdproc/tests/pytest_fixtures.py:66), which already constructs data through the configured backend (xp.asarray(..., device=xp_device)). The test then calls plain np.zeros_like(ccd_data.data) instead of the backend-aware xp.zeros_like pattern used consistently elsewhere (e.g. test_combiner.py:678, test_ccdproc.py:378). A second, identical instance exists at ccdproc/tests/test_rebin.py:70.
This is test-only, and narrower than the #941 table row. That row ("test_image_collection.py, test_ccdproc_logging.py:75, misc singletons", ~4 failures, "an ImageFileCollection gap") was verified at branch tip d329ac5: only the test_ccdproc_logging.py:75 failure reproduces. test_image_collection.py passes 77/77 under array-api-strict — ImageFileCollection defaults to numpy and only converts via xp.asarray when a caller explicitly passes array_package, so no library-side gap was found. The ImageFileCollection claim was either fixed since the 94ca9ec run or a false positive; no library issue is warranted.
Suggested fix: swap np.zeros_like for xp.zeros_like (using the per-test xp fixture as other test modules do) at ccdproc/tests/test_ccdproc_logging.py:75 and ccdproc/tests/test_rebin.py:70.
Part of the array-API triage in #941; found with the array-api-strict tooling from #937/#939.
🤖 Generated with Claude Code
Running the array-api-strict backend surfaces a test-suite defect: raw
np.zeros_likecalled on backend-aware fixture arrays.Root cause:
test_implicit_loggingbuilds itsCCDDatavia the sharedccd_data_func()fixture (ccdproc/tests/pytest_fixtures.py:66), which already constructs data through the configured backend (xp.asarray(..., device=xp_device)). The test then calls plainnp.zeros_like(ccd_data.data)instead of the backend-awarexp.zeros_likepattern used consistently elsewhere (e.g.test_combiner.py:678,test_ccdproc.py:378). A second, identical instance exists atccdproc/tests/test_rebin.py:70.This is test-only, and narrower than the #941 table row. That row ("test_image_collection.py, test_ccdproc_logging.py:75, misc singletons", ~4 failures, "an ImageFileCollection gap") was verified at branch tip d329ac5: only the
test_ccdproc_logging.py:75failure reproduces.test_image_collection.pypasses 77/77 under array-api-strict —ImageFileCollectiondefaults to numpy and only converts viaxp.asarraywhen a caller explicitly passesarray_package, so no library-side gap was found. The ImageFileCollection claim was either fixed since the 94ca9ec run or a false positive; no library issue is warranted.Suggested fix: swap
np.zeros_likeforxp.zeros_like(using the per-testxpfixture as other test modules do) atccdproc/tests/test_ccdproc_logging.py:75andccdproc/tests/test_rebin.py:70.Part of the array-API triage in #941; found with the array-api-strict tooling from #937/#939.
🤖 Generated with Claude Code