Skip to content

Commit 97abc5f

Browse files
committed
Use array_to_datetime in _check_dtype_and_dim
1 parent d63a42f commit 97abc5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/clib/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def _check_dtype_and_dim(self, array, ndim):
745745
if array.dtype.type not in DTYPES:
746746
try:
747747
# Try to convert any unknown numpy data types to np.datetime64
748-
array = np.asarray(array, dtype=np.datetime64)
748+
array = array_to_datetime(array)
749749
except ValueError as e:
750750
raise GMTInvalidInput(
751751
f"Unsupported numpy data type '{array.dtype.type}'."

0 commit comments

Comments
 (0)