Skip to content

Commit 6a9b0bd

Browse files
committed
dataarray_to_matrix: Make sure that the returned region/inc is a list of scalar values
1 parent 92a69e0 commit 6a9b0bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pygmt/clib/conversion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def dataarray_to_matrix(grid):
124124
grid = grid.sortby(variables=list(grid.dims), ascending=True)
125125

126126
matrix = as_c_contiguous(grid[::-1].to_numpy())
127+
region = region.tolist()
128+
inc = inc.tolist()
127129
return matrix, region, inc
128130

129131

0 commit comments

Comments
 (0)