Skip to content

Commit fe0fbc5

Browse files
committed
Replace unnecessary comprehension with generator
Credit to weiji14#103 (comment).
1 parent 0a73114 commit fe0fbc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/clib/conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def dataarray_to_matrix(grid):
109109
)
110110
inc.append(coord_inc)
111111

112-
if any([i < 0 for i in inc]): # Sort grid when there are negative increments
112+
if any(i < 0 for i in inc): # Sort grid when there are negative increments
113113
inc = [abs(i) for i in inc]
114114
grid = grid.sortby(variables=list(grid.dims), ascending=True)
115115

0 commit comments

Comments
 (0)