Skip to content

Commit

Permalink
add string marks in warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Apr 27, 2024
1 parent 7e8f895 commit ed85446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4699,7 +4699,7 @@ def expand_dims(
if create_index:
warnings.warn(
f"No index created for dimension {k} because variable {k} is not a coordinate. "
f"To create an index for {k}, please first call `.set_coords({k})` on this object.",
f"To create an index for {k}, please first call `.set_coords('{k}')` on this object.",
UserWarning,
)

Expand Down

0 comments on commit ed85446

Please sign in to comment.