Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array API #1022

Open
wants to merge 163 commits into
base: main
Choose a base branch
from
Open

Array API #1022

wants to merge 163 commits into from

Conversation

neosunhan
Copy link
Collaborator

@neosunhan neosunhan commented Sep 4, 2022

Description

Implement array API according to the Python array API standard (version 2021.12)

See #774 for more information.

Changes proposed:

  • In conformance with the specification, the new standard-compliant API will be offered in a new namespace. This namespace can be accessed through a method on the array object.
xp = x.__array_namespace__(api_version='2020.10')

EDIT (Claudia): This PR also introduces a workflow to test compliance whenever a PR is reviewed.
EDIT2: workflow triggered manually, API version 2023.12

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Updated changelog.md under the title "Pending Additions"

Does this change modify the behaviour of other functions? If so, which?

no

skip ci

This fixes a bug where negative numbers could be represented by uint8.
In cases involving large numbers where the `dtype` parameter was
unchanged, precision loss occurred due to intermediate casting
to float32 (in `__local_op`) before casting back to the original
`dtype`.

Fixed by not doing the intermediate casting.
Fixed bug in `ht.any` where `keepdim` argument was not working
when `axis=None` (same fix as 136e1b7)
f0a169b introduced a change in ht.abs where the dtype is not
promoted to float by default. This caused the tests to fail.
@github-actions github-actions bot added the stale label Jun 17, 2024
@github-actions github-actions bot removed the stale label Jul 1, 2024
@mtar mtar marked this pull request as ready for review July 16, 2024 10:52
@mtar mtar requested a review from ClaudiaComito July 16, 2024 10:56
Copy link
Contributor

Thank you for the PR!

@mtar
Copy link
Collaborator

mtar commented Jul 16, 2024

All Linalg tests are skipped for now.

Copy link
Collaborator

@mtar mtar Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains all function tests that sometimes fail and sometimes not. It skips them. Might be easier to fix later.

Copy link
Collaborator

@mtar mtar Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains function tests that failed every single time. These are expected to fail again. Mostly not implemented or not compliant functions.

Copy link
Contributor

@ClaudiaComito ClaudiaComito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add @neosunhan 's name to the list of contributors . Otherwise this can be merged, great job @mtar and @neosunhan !

Copy link
Contributor

Thank you for the PR!

@ClaudiaComito ClaudiaComito modified the milestones: 1.5.0, 1.6 Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants