Skip to content

Commit 7dc353b

Browse files
committed
Revert support of pyarrow.array inputs to put_strings
1 parent 7b00248 commit 7dc353b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pygmt/clib/session.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,8 +1029,7 @@ def put_strings(self, dataset: ctp.c_void_p, family: str, strings: np.ndarray):
10291029
Raises
10301030
------
10311031
GMTCLibError
1032-
If given invalid input or ``GMT_Put_Strings`` exits with
1033-
status != 0.
1032+
If given invalid input or ``GMT_Put_Strings`` exits with a non-zero status.
10341033
"""
10351034
c_put_strings = self.get_libgmt_func(
10361035
"GMT_Put_Strings",
@@ -1051,8 +1050,7 @@ def put_strings(self, dataset: ctp.c_void_p, family: str, strings: np.ndarray):
10511050
self.session_pointer, family_int, dataset, strings_pointer
10521051
)
10531052
if status != 0:
1054-
dtype = strings.dtype if hasattr(strings, "dtype") else type(strings)
1055-
msg = f"Failed to put strings of type {dtype} into dataset."
1053+
msg = f"Failed to put strings of type {strings.dtype} into dataset."
10561054
raise GMTCLibError(msg)
10571055

10581056
def put_matrix(self, dataset: ctp.c_void_p, matrix: np.ndarray, pad: int = 0):

0 commit comments

Comments
 (0)