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

Internal promotion rules should distinguish between 0-D scalars and non 0-D scalars #2861

Open
agoose77 opened this issue Dec 1, 2023 · 3 comments
Labels
bug The problem described is something that must be fixed

Comments

@agoose77
Copy link
Collaborator

agoose77 commented Dec 1, 2023

Version of Awkward Array

main

Description and code to reproduce

The presence of 0-D scalars as input to ak.to_layout presents a tension between preserving scalar-ness and mixing backends between 0D scalars and other arrays.

We could add a rule to promote 0D arrays to 1D-length-1 arrays. But, on balance this would affect typetracer, whose scalars are only ever 0D arrays. In general, the scalar-ness matters. Another solution would be to implement a new function that maps 0D scalars between backends.

@agoose77 agoose77 added bug (unverified) The problem described would be a bug, but needs to be triaged bug The problem described is something that must be fixed and removed bug (unverified) The problem described would be a bug, but needs to be triaged labels Dec 1, 2023
@jpivarski jpivarski added this to Unprioritized in Finalization Jan 19, 2024
@jpivarski jpivarski moved this from Unprioritized to P5 in Finalization Jan 19, 2024
@jpivarski
Copy link
Member

How related is this to #1057? Is it a duplicate? (Reopen if not.)

@jpivarski jpivarski removed this from P5 in Finalization Jan 20, 2024
@agoose77
Copy link
Collaborator Author

This is a distinct issue, but I'll need to find a reproducer to figure out the best description!

@jpivarski
Copy link
Member

Rather than use up numbers, I'll reopen this as a place for you to put the reproducer. Thanks!

@jpivarski jpivarski reopened this Jan 22, 2024
@jpivarski jpivarski added this to P3 in Finalization Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The problem described is something that must be fixed
Projects
Development

No branches or pull requests

2 participants