Skip to content

RFC: add support for complex input to mean #846

Closed

Description

@lucascolley

x-ref https://github.com/data-apis/array-api-extra/pull/10/files#r1776010210

While implementing a simple cov in array-api-extra (data-apis/array-api-extra#10) I found that xp.mean does not support complex input. @kgryte suggested opening an issue over here as the arithmetic mean is well-defined for complex numbers.

Activity

  1. added
    RFC
    API change
    topic: Complex Data Types
    on Sep 25, 2024
  2. added this to the v2024 milestone on Sep 25, 2024
  3. asmeurer commented on Sep 25, 2024

    @asmeurer
    Member

    Was there a reason for this or was it just an accidental omission? Mean is well-defined for complex numbers (https://en.wikipedia.org/wiki/Complex_random_variable), and should be easy to implement since you either just apply the real kernel formula directly to complex data types, or take the means of the real and imaginary parts separately.

  4. kgryte commented on Sep 25, 2024

    @kgryte
    Contributor

    I believe an omission and thus far no R&D whether supported across all array libraries.

  5. kgryte commented on Oct 31, 2024

    @kgryte
    Contributor

    I've opened #850.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    API changeRFCtopic: Complex Data Typestopic: Statistics

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions