Skip to content

Commit 578b37b

Browse files
committed
For a dict, need to apply np.atleast_1d to make sure the value is an array
1 parent 4b3e8f3 commit 578b37b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/clib/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ def virtualfile_in( # noqa: PLR0912
17291729
if hasattr(data, "items") and not hasattr(data, "to_frame"):
17301730
# Dict, pandas.DataFrame or xarray.Dataset types.
17311731
# pandas.Series will be handled below like a 1-D numpy.ndarray.
1732-
_data = [array for _, array in data.items()]
1732+
_data = [np.atleast_1d(array) for _, array in data.items()]
17331733
else:
17341734
# Python list, tuple, and pandas.Series types
17351735
_data = np.atleast_2d(np.asanyarray(data).T)

0 commit comments

Comments
 (0)