Skip to content

Commit 6b7a578

Browse files
committed
Should transpose the 2-D matrix before passing to virtualfile_from_vectors
1 parent ef6e6aa commit 6b7a578

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pygmt/clib/session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@ def virtualfile_from_vectors(self, *vectors):
13921392
# virtual file is closed. The conversion is implicit in
13931393
# vectors_to_arrays.
13941394
arrays = vectors_to_arrays(vectors)
1395+
print(vectors, arrays)
13951396

13961397
columns = len(arrays)
13971398
# Find arrays that are of string dtype from column 3 onwards
@@ -1831,7 +1832,7 @@ def virtualfile_in( # noqa: PLR0912
18311832
_data = (data,)
18321833
if data.dtype.kind not in "iuf":
18331834
_virtualfile_from = self.virtualfile_from_vectors
1834-
_data = data
1835+
_data = data.T
18351836

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

0 commit comments

Comments
 (0)