Skip to content

Is line_delimited being ignored in dak.from_json? #589

@ikrommyd

Description

@ikrommyd

Notice the differences between dask-awkward and awkward in the layout:

In [15]: ak.from_json(pathlib.Path("tmp.json"), line_delimited=True)
Out[15]: <Array [[[1.1, 2.2, 3.3], [], [4.4, 5.5]]] type='1 * var * var * float64'>

In [16]: ak.from_json(pathlib.Path("tmp.json"), line_delimited=False)
Out[16]: <Array [[1.1, 2.2, 3.3], [], [4.4, 5.5]] type='3 * var * float64'>

In [17]: dak.from_json("tmp.json", line_delimited=True).compute()
Out[17]: <Array [[[1.1, 2.2, 3.3], [], [4.4, 5.5]]] type='1 * var * var * float64'>

In [18]: dak.from_json("tmp.json", line_delimited=False).compute()
Out[18]: <Array [[[1.1, 2.2, 3.3], [], [4.4, 5.5]]] type='1 * var * var * float64'>

tmp.json was created by:

with open("tmp.json", "w") as file:
    file.write("[[1.1, 2.2, 3.3], [], [4.4, 5.5]]")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions