Skip to content

Commit

Permalink
Should transpose the 2-D matrix before passing to virtualfile_from_ve…
Browse files Browse the repository at this point in the history
…ctors
  • Loading branch information
seisman committed Oct 15, 2024
1 parent ef6e6aa commit 6b7a578
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,7 @@ def virtualfile_from_vectors(self, *vectors):
# virtual file is closed. The conversion is implicit in
# vectors_to_arrays.
arrays = vectors_to_arrays(vectors)
print(vectors, arrays)

columns = len(arrays)
# Find arrays that are of string dtype from column 3 onwards
Expand Down Expand Up @@ -1831,7 +1832,7 @@ def virtualfile_in( # noqa: PLR0912
_data = (data,)
if data.dtype.kind not in "iuf":
_virtualfile_from = self.virtualfile_from_vectors
_data = data
_data = data.T

# Finally create the virtualfile from the data, to be passed into GMT
file_context = _virtualfile_from(*_data)
Expand Down

0 comments on commit 6b7a578

Please sign in to comment.