Skip to content

All jax backend reducers give wrong length output if the last element of the input jagge arrays is empty #3462

Open
0 of 1 issue completed
@ikrommyd

Description

@ikrommyd

All the reducers ignore the last element as we're not properly assigning the right num_segments and that causes them to ignore the last element which is empty

In [5]: import awkward as ak
   ...: ak.jax.register_and_check()
   ...:
   ...: x = ak.sum(ak.Array([[1, 2], [], [6,4,5], []], backend="cpu"), axis=1)
   ...: y = ak.sum(ak.Array([[1, 2], [], [6,4,5], []], backend="jax"), axis=1)

In [6]: x
Out[6]: <Array [3, 0, 15, 0] type='4 * int64'>

In [7]: y
Out[7]: <Array [3, 0, 15] type='3 * int64'>

Similar results are observed with every reducer.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe problem described is something that must be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions