Skip to content

Update type promotion rules for complex dtypes - #491

Merged
kgryte merged 4 commits into
data-apis:mainfrom
rgommers:complex-type-promotion-rules
Nov 17, 2022
Merged

Update type promotion rules for complex dtypes#491
kgryte merged 4 commits into
data-apis:mainfrom
rgommers:complex-type-promotion-rules

Conversation

@rgommers

@rgommersrgommers commented Oct 6, 2022

Copy link
Copy Markdown
Member
  • Add a table with promotion rules
  • Update type promotion lattice diagram

Closesgh-477
Closesgh-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
Closesdata-apisgh-477Closesdata-apisgh-478
@rgommersrgommers added the topic: Complex Data Types Complex number data types. label Oct 6, 2022
@rgommersrgommers 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
Copy Markdown
Contributor

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
Copy Markdown
MemberAuthor

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

@kgrytekgryte left a comment

Copy link
Copy Markdown
Contributor

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:mainNov 17, 2022
@rgommers
rgommers deleted the complex-type-promotion-rules branch November 17, 2022 09:29
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: Complex Data TypesComplex 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

@rgommers@kgryte