Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plopp/plotting/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _check_coord_sanity(da: sc.DataArray) -> None:
'The input contains a coordinate with unsorted values '
f'({name}). The results may be unpredictable. '
'Coordinates can be sorted using '
'`scipp.sort(data, dim="to_be_sorted", order="ascending")`.',
'`scipp.sort(data, key="to_be_sorted", order="ascending")`.',
RuntimeWarning,
stacklevel=2,
)
Expand Down
6 changes: 5 additions & 1 deletion tests/plotting/common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ def test_preprocess_warns_when_coordinate_is_not_sorted():
da = data_array(ndim=1)
unsorted = sc.concat([da['xx', 20:], da['xx', :20]], dim='xx')
with pytest.warns(
RuntimeWarning, match='The input contains a coordinate with unsorted values'
RuntimeWarning,
match=(
r'The input contains a coordinate with unsorted values.*'
r'scipp\.sort\(data, key="to_be_sorted", order="ascending"\)'
),
):
preprocess(unsorted)

Expand Down
Loading