Problem
Two closely related densification points in the combining pipeline:
-
Combiner.sigma_clipping delegates to astropy.stats.sigma_clip, which internally does np.asanyarray and works with np.ma masked arrays — both densify non-numpy input:
-
ccdproc.sigma_func — the default deviation function for median_combine uncertainty — is built on astropy.stats.median_absolute_deviation, which is likewise numpy-only:
|
stats.median_absolute_deviation(arr, axis=axis, ignore_nan=ignore_nan) |
These likely account for a substantial share of the Implicit conversion to a NumPy array is not allowed failures in #911.
Options
Found during a review of the array API implementation from #885; follow-up to #909 / #911. Related: #906.
Problem
Two closely related densification points in the combining pipeline:
Combiner.sigma_clippingdelegates toastropy.stats.sigma_clip, which internally doesnp.asanyarrayand works withnp.mamasked arrays — both densify non-numpy input:ccdproc/ccdproc/combiner.py
Line 449 in 9d25eee
ccdproc.sigma_func— the default deviation function formedian_combineuncertainty — is built onastropy.stats.median_absolute_deviation, which is likewise numpy-only:ccdproc/ccdproc/core.py
Line 1233 in 9d25eee
These likely account for a substantial share of the
Implicit conversion to a NumPy array is not allowedfailures in #911.Options
xp.where, and a MAD built on the fallback median discussed in Consider adding fallback median implementation #906.astropy.stats(tracked in Tracking: upstream array-API blockers (astropy, reproject, astroscrappy) #940).Found during a review of the array API implementation from #885; follow-up to #909 / #911. Related: #906.