Skip to content

ak.from_buffers does not respect the byteorder kwarg in the case of ndarray buffers (it works only for bytes buffers) #3821

@ikrommyd

Description

@ikrommyd

Version of Awkward Array

HEAD

Description and code to reproduce

For example:

import awkward as ak
array = ak.Array([1,2,3])
print(array)
print(ak.from_buffers(*ak.to_buffers(array, byteorder=">"), byteorder=">"))

incorrectly prints

[1, 2, 3]
[72057594037927936, 144115188075855872, 216172782113783808]

while it should be

[1, 2, 3]
[1, 2, 3]

The reason is that the byteorder kwarg is not considered in ak.from_buffers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug (unverified)The problem described would be a bug, but needs to be triaged

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions