From 1cbed959378839ba8538b49ee10f8b6188b98ec6 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 31 Oct 2024 13:37:12 +0800 Subject: [PATCH] Test timedelta64 dtype arrays with various date/time units --- pygmt/tests/test_clib_put_vector.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pygmt/tests/test_clib_put_vector.py b/pygmt/tests/test_clib_put_vector.py index d42ee9afbba..de0df8182b2 100644 --- a/pygmt/tests/test_clib_put_vector.py +++ b/pygmt/tests/test_clib_put_vector.py @@ -171,10 +171,12 @@ def test_put_vector_string_dtype(): def test_put_vector_timedelta64_dtype(): """ - Passing timedelta64 type vectors with various time units (year, month, - week, day, hour, minute, second, millisecond, microsecond) to a dataset. + Passing timedelta64 type vectors with various date/time units to a dataset. + + Valid date/time units can be found at + https://numpy.org/devdocs/reference/arrays.datetime.html#datetime-units. """ - for unit in ["Y", "M", "W", "D", "h", "m", "s", "ms", "μs"]: + for unit in ["Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as"]: with clib.Session() as lib, GMTTempFile() as tmp_file: dataset = lib.create_data( family="GMT_IS_DATASET|GMT_VIA_VECTOR",