Skip to content

2023.12 support #249

Closed
Closed

Description

@asmeurer

We need a tracking issue for 2023.12 support in the test suite.

Here is the list of changes https://data-apis.org/array-api/latest/changelog.html#v2023-12

New Functions

  • __array_namespace_info__ (i.e., the inspection API)
  • clip
  • copysign
  • cumulative_sum
  • hypot
  • maximum
  • minimum
  • moveaxis
  • repeat
  • searchsorted
  • signbit
  • tile
  • unstack

API Changes

Other Changes
(not sure if these need tests)

  • Support for lazy functions in various APIs. Will probably need a real world lazy implementation to support this.
  • Order of signed zeros unspecified for max and min. Just need to make sure we aren't testing this.
  • Out of bounds unspecified for take.
  • tensordot should support negative axes (not sure if this is already tested)

I think that's everything but you might want to read through the changes too to check if I missed something.

Activity

  1. asmeurer commented on Apr 19, 2024

    @asmeurer
    MemberAuthor

    Note: clip is tricky, especially given the divergences between the standard and the NumPy implementation. We should be especially sure to that the test can catch possible issues with incorrect promotion behavior (clip should not promote but return the same dtype as x) so we can catch potential issues with integer overflow like described at numpy/numpy#24976

  2. asmeurer commented on Apr 19, 2024

    @asmeurer
    MemberAuthor

    Notes for copysign special cases: One can construct a nan with a negative sign bit using -float('nan'). To test the sign bit of a nan you'd either have to use signbit or use math.copysign.

  3. self-assigned this
    on Apr 29, 2024
  4. asmeurer commented on Apr 29, 2024

    @asmeurer
    MemberAuthor

    I edited the above list to add a couple of things I missed.

  5. asmeurer commented on May 6, 2024

    @asmeurer
    MemberAuthor

    Should this have been closed?

  6. reopened this on May 7, 2024
  7. honno commented on May 7, 2024

    @honno
    Member

    Should this have been closed?

    Good catch!

  8. asmeurer commented on May 7, 2024

    @asmeurer
    MemberAuthor

    I noticed the searchsorted test is broken because it uses __array_namespace_info__, which isn't listed correctly in the array-api stubs (it's also broken because it uses float instead of int for the sorter array, but that's an easy fix). I tried fixing this in the submodule:

    diff --git a/src/array_api_stubs/_2023_12/__init__.py b/src/array_api_stubs/_2023_12/__init__.py
    index 8415f276..537ea8f8 100644
    --- a/src/array_api_stubs/_2023_12/__init__.py
    +++ b/src/array_api_stubs/_2023_12/__init__.py
    @@ -16,7 +16,7 @@ from .statistical_functions import *
     from .utility_functions import *
     from . import linalg
     from . import fft
    -from . import info
    +from .info import __array_namespace_info__
    
    
     __array_api_version__: str = "YYYY.MM"

    but the fix doesn't seem to work.

  9. asmeurer commented on Nov 14, 2024

    @asmeurer
    MemberAuthor

    I think we can close this actually. Some of the above functions are only partially tested, but that is tracked at #301

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions