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

Update type promotion rules for complex dtypes #491

Merged
merged 4 commits into from
Nov 17, 2022

Conversation

rgommers
Copy link
Member

@rgommers rgommers commented Oct 6, 2022

  • Add a table with promotion rules
  • Update type promotion lattice diagram

Closes gh-477
Closes gh-478

On gh-478, @leofang made a different suggestion regarding the actual rules (mixed-kind real/complex allowed), so let's discuss that there before merging this. Marking as draft for now.

- Add a table with promotion rules
- Update type promotion lattice diagram

Closes data-apisgh-477
Closes data-apisgh-478
@rgommers rgommers added the topic: Complex Data Types Complex number data types. label Oct 6, 2022
@rgommers rgommers added this to the v2022 milestone Oct 6, 2022
@rgommers rgommers marked this pull request as draft October 6, 2022 15:11
@kgryte
Copy link
Contributor

kgryte commented Nov 3, 2022

Based on discussions on gh-478 and during the 22 September 2022 consortium meeting, we should update this PR to have a single floating-point table with both real and complex floating-point data types, as proposed by Leo (see #478 (comment)).

TensorFlow's lack of real-complex dtype promotion was not considered a blocker. An increase in the number of kernels (i.e., implementations for specific dtype pairs) was also not considered a blocker. The number of kernels an array library chooses to implement is an implementation detail; from a user POV, the expectation is that mixed real-complex promotion should just work.

@rgommers rgommers marked this pull request as ready for review November 16, 2022 20:22
@rgommers
Copy link
Member Author

Okay, this should be good to go now (please squash commits when merging). Apologies for the delay.

Copy link
Contributor

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM.

@kgryte kgryte merged commit aefec14 into data-apis:main Nov 17, 2022
@rgommers rgommers deleted the complex-type-promotion-rules branch November 17, 2022 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: Complex Data Types Complex number data types.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complex type promotion rules are unclear Complex type promotion diagram disappears in the draft standard
2 participants