Skip to content

Commit

Permalink
For a dict, need to apply np.atleast_1d to make sure the value is an …
Browse files Browse the repository at this point in the history
…array
  • Loading branch information
seisman committed Aug 4, 2024
1 parent 4b3e8f3 commit 578b37b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ def virtualfile_in( # noqa: PLR0912
if hasattr(data, "items") and not hasattr(data, "to_frame"):
# Dict, pandas.DataFrame or xarray.Dataset types.
# pandas.Series will be handled below like a 1-D numpy.ndarray.
_data = [array for _, array in data.items()]
_data = [np.atleast_1d(array) for _, array in data.items()]
else:
# Python list, tuple, and pandas.Series types
_data = np.atleast_2d(np.asanyarray(data).T)
Expand Down

0 comments on commit 578b37b

Please sign in to comment.