Skip to content

Commit

Permalink
Revert support of pyarrow.array inputs to put_strings
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Nov 15, 2024
1 parent 7b00248 commit d92ca80
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,7 @@ def put_strings(self, dataset: ctp.c_void_p, family: str, strings: np.ndarray):
Raises
------
GMTCLibError
If given invalid input or ``GMT_Put_Strings`` exits with
status != 0.
If given invalid input or ``GMT_Put_Strings`` exits with status != 0.
"""
c_put_strings = self.get_libgmt_func(
"GMT_Put_Strings",
Expand All @@ -1051,8 +1050,7 @@ def put_strings(self, dataset: ctp.c_void_p, family: str, strings: np.ndarray):
self.session_pointer, family_int, dataset, strings_pointer
)
if status != 0:
dtype = strings.dtype if hasattr(strings, "dtype") else type(strings)
msg = f"Failed to put strings of type {dtype} into dataset."
msg = f"Failed to put strings of type {strings.dtype} into dataset."
raise GMTCLibError(msg)

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

0 comments on commit d92ca80

Please sign in to comment.