Skip to content

RFC: add support for computing the element-wise minimum and maximum #667

Closed
@kgryte

Description

@kgryte

This proposes adding support for computing the element-wise minimum and maximum values when provided two input arrays.

Overview

Based on API comparison data, maximum and minimum APIs are available in all array libraries. And each array library uses the same naming convention: maximum and minimum.

Prior art

maximum

minimum

Proposal

def maximum(x1: array, x2: array, /)
def minimum(x1: array, x2: array, /)

Note: as in the specified min and max, while conforming implementations may support complex number inputs, inequality comparisons of complex numbers is unspecified, and thus implementation-dependent.

Questions

  • Is the min/minimum and max/maximum naming distinction clear enough, where the former are reductions and the latter are binary element-wise operations?

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    API extensionAdds new functions or objects to the API.

    Type

    No type

    Projects

    Status

    Stage 1

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions