Internal promotion rules should distinguish between 0-D scalars and non 0-D scalars #2861
Labels
bug
The problem described is something that must be fixed
Projects
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.
The text was updated successfully, but these errors were encountered: