We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9af6b9c commit 5dbcce9Copy full SHA for 5dbcce9
pygmt/src/grdinfo.py
@@ -2,7 +2,8 @@
2
grdinfo - Retrieve info about grid file.
3
"""
4
5
-from pygmt.clib import Session
+from packaging.version import Version
6
+from pygmt.clib import Session, __gmt_version__
7
from pygmt.helpers import (
8
GMTTempFile,
9
build_arg_list,
@@ -111,7 +112,9 @@ def grdinfo(grid, **kwargs):
111
112
A string with information about the grid.
113
114
# Workaround for upstream bug https://github.com/GenericMappingTools/gmt/issues/8525
- grid_as_matrix = bool(kwargs.get("L"))
115
+ grid_as_matrix = Version(__gmt_version__) <= Version("6.5.0") and bool(
116
+ kwargs.get("L")
117
+ )
118
119
with GMTTempFile() as outfile:
120
with Session(grid_as_matrix=grid_as_matrix) as lib:
0 commit comments