Skip to content

optimize compatibility checks in merge.unique_variable #3311

Closed
@dcherian

Description

@dcherian

Currently merge.unique_variable does this

    if equals is None:
        out = out.compute()
        for var in variables[1:]:
            equals = getattr(out, compat)(var)
            if not equals:
                break

out (=variables[0]) is always computed though it may not be necessary.

One solution would be to loop through once checking attrs, shapes and _data. If these checks were satisfied, then we execute the above code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions