Skip to content

Commit

Permalink
Use array_to_datetime in _check_dtype_and_dim
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Apr 5, 2023
1 parent d63a42f commit 97abc5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def _check_dtype_and_dim(self, array, ndim):
if array.dtype.type not in DTYPES:
try:
# Try to convert any unknown numpy data types to np.datetime64
array = np.asarray(array, dtype=np.datetime64)
array = array_to_datetime(array)
except ValueError as e:
raise GMTInvalidInput(
f"Unsupported numpy data type '{array.dtype.type}'."
Expand Down

0 comments on commit 97abc5f

Please sign in to comment.