Skip to content

Preserve field order in with_field #3680

@DylanModesitt

Description

@DylanModesitt

Description of new feature

I will often replace an existing structure field with some processing, e.g.:

x = ak.Array(...)
x["ref"] = update_dependencies(x["ref"], guide)
...

At present, this re-orders the fields of the array ("ref" will come last). It seems reasonable/predictable that the field order would instead be preserved if we are assigning a field that already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions