Skip to content

Improvements to test_solve #239

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

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Conversation

asmeurer
Copy link
Member

@asmeurer asmeurer commented Mar 1, 2024

  • Fix it to only generate arguments with mutually promotable dtypes
  • Test dtype promotion
  • Test output shape

Note that the standard is currently wrong for the solve output shape https://data-apis.org/array-api/latest/extensions/generated/array_api.linalg.solve.html#array_api.linalg.solve. It says

The returned array must have the same shape as x2

But this is wrong, it should have a shape like (...,) + x2.shape, where (...,) is the broadcasted stack shapes of x1 and x2.

- Fix it to only generate arguments with mutually promotable dtypes
- Test dtype promotion
- Test output shape
Copy link
Member

@honno honno left a comment

Choose a reason for hiding this comment

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

All looks good!

@honno honno merged commit fec6f35 into data-apis:master Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants