Skip to content
Merged
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
5 changes: 4 additions & 1 deletion pygmt/alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def _to_string(

>>> _to_string(["xaf", "yaf", "WSen"])
['xaf', 'yaf', 'WSen']

>>> _to_string([[1, 2], [3, 4]], separator="/", ndim=2)
['1/2', '3/4']
"""
# None and False are converted to None.
if value is None or value is False:
Expand All @@ -132,7 +135,7 @@ def _to_string(
# Join the sequence of values with the separator.
# "prefix" and "mapping" are ignored. We can enable them when needed.
_value = sequence_join(value, separator=separator, size=size, ndim=ndim, name=name)
return f"{prefix}{_value}"
return _value if is_nonstr_iter(_value) else f"{prefix}{_value}"


class Alias:
Expand Down
Loading