Skip to content

MLX compatibility: Statistical functions #463

Description

@prady0t
Array API MLX Analog Status Notes Test Node Result
cumulative_sum(x, /, *, axis=None, dtype=None, include_initial=False) cumsum(a, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, dtype: Dtype | None = None, stream=None) incompatible MLX lacks the include_initial keyword (raises TypeError) and skips the standard default-integer dtype promotion — a uint8 input stays uint8 instead of promoting to uint32. test_cumulative_sum Failed
cumulative_prod(x, /, *, axis=None, dtype=None, include_initial=False) cumprod(a, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, dtype: Dtype | None = None, stream=None) incompatible Same two issues as cumulative_sum: missing include_initial keyword and no default-integer dtype promotion (uint8 stays uint8 instead of uint32). test_cumulative_prod Failed
prod(x, /, *, axis=None, dtype=None, keepdims=False) prod(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream=None) incompatible MLX has no dtype keyword (raises TypeError) and does not promote small integer inputs to the standard default integer dtype (uint8 stays uint8 instead of uint32). test_prod Failed
std(x, /, *, axis=None, correction=0.0, keepdims=False) std(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, ddof: int = 0, *, stream=None) incompatible MLX exposes ddof instead of the Array API's correction keyword, so passing correction raises a TypeError. test_std Failed
sum(x, /, *, axis=None, dtype=None, keepdims=False) sum(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream=None) incompatible MLX has no dtype keyword (raises TypeError) and does not promote small integer inputs to the standard default integer dtype (uint8 stays uint8 instead of uint32). test_sum Failed
var(x, /, *, axis=None, correction=0.0, keepdims=False) var(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, ddof: int = 0, *, stream=None) incompatible MLX exposes ddof instead of the Array API's correction keyword, so passing correction raises a TypeError. test_var Failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions