Skip to content

Array API: Combiner.sigma_clipping and the default sigma_func densify via astropy.stats #929

Description

@mwcraig

Problem

Two closely related densification points in the combining pipeline:

  1. 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:

    | sigma_clip(

  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions