Skip to content

Commit 1864556

Browse files
committed
Explicitly checking array.dtype.type
1 parent 6338cde commit 1864556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygmt/tests/test_clib_vectors_to_arrays.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_vectors_to_arrays_pandas_string():
8484
pd.Series(["abcdef", "123456"], dtype="string"),
8585
]
8686
arrays = vectors_to_arrays(vectors)
87-
assert all(isinstance(i.dtype, np.dtypes.StrDType) for i in arrays)
87+
assert all(i.dtype.type == np.str_ for i in arrays)
8888
_check_arrays(arrays)
8989

9090

@@ -104,5 +104,5 @@ def test_vectors_to_arrays_pyarrow_datetime():
104104
),
105105
]
106106
arrays = vectors_to_arrays(vectors)
107-
assert all(isinstance(i.dtype, np.dtypes.DateTime64DType) for i in arrays)
107+
assert all(i.dtype.type == np.datetime64 for i in arrays)
108108
_check_arrays(arrays)

0 commit comments

Comments
 (0)