(variable: Variable)
| 1351 | |
| 1352 | |
| 1353 | def coordinates_from_variable(variable: Variable) -> Coordinates: |
| 1354 | (name,) = variable.dims |
| 1355 | new_index, index_vars = create_default_index_implicit(variable) |
| 1356 | indexes = dict.fromkeys(index_vars, new_index) |
| 1357 | new_vars = new_index.create_variables() |
| 1358 | new_vars[name].attrs = variable.attrs |
| 1359 | return Coordinates(new_vars, indexes) |
no test coverage detected
searching dependent graphs…