Skip to content

Commit f4f4015

Browse files
committed
Convert to np.datetime64 directly instead of using np.asarray
1 parent 607b3ff commit f4f4015

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
@@ -720,7 +720,7 @@ def _check_dtype_and_dim(self, array, ndim):
720720
if array.dtype.type not in DTYPES:
721721
try:
722722
# Try to convert any unknown numpy data types to np.datetime64
723-
array = np.asarray(array, dtype=np.datetime64)
723+
array = np.datetime64(array)
724724
except ValueError:
725725
raise GMTInvalidInput(
726726
"Unsupported numpy data type '{}'.".format(array.dtype.type)

0 commit comments

Comments
 (0)