(a, b)
| 91 | __tracebackhide__ = True |
| 92 | |
| 93 | def _maybe_transpose_dims(a, b): |
| 94 | if not isinstance(a, Variable | DataArray | Dataset): |
| 95 | return b |
| 96 | if set(a.dims) == set(b.dims): |
| 97 | # Ensure transpose won't fail if a dimension is missing |
| 98 | # If this is the case, the difference will be caught by the caller |
| 99 | return b.transpose(*a.dims) |
| 100 | return b |
| 101 | |
| 102 | if check_dim_order: |
| 103 | return b |
no test coverage detected
searching dependent graphs…