Skip to content

Commit

Permalink
ENH: support for datetime types
Browse files Browse the repository at this point in the history
  • Loading branch information
genematx committed Sep 5, 2024
1 parent ef55ea9 commit 0d4a0f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tiled/_tests/test_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"dtype_c": (numpy.arange(10) * 1j).astype("c"),
"dtype_S": numpy.array([letter * 3 for letter in string.ascii_letters], dtype="S3"),
"dtype_U": numpy.array([letter * 3 for letter in string.ascii_letters], dtype="U3"),
"dtype_m": numpy.array(['2007-07-13', '2006-01-13', '2010-08-13'], dtype='datetime64') - numpy.datetime64('2008-01-01'),
"dtype_M": numpy.array(['2007-07-13', '2006-01-13', '2010-08-13'], dtype='datetime64'),
"random_2d": rng.random((10, 10)),
}
# TODO "datetime64", bitfield "t", void "v", and object "O" (which is not supported by default)
# TODO bitfield "t", void "v", and object "O" (which is not supported by default)
scalar_cases = {
k: numpy.array(v[0], dtype=v.dtype)
for k, v in array_cases.items()
Expand Down
1 change: 1 addition & 0 deletions tiled/server/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"id": "blosc",
"shuffle": 1,
}
ZARR_DATETIME64_PRECISION = 'ns'

import numcodecs

Expand Down

0 comments on commit 0d4a0f7

Please sign in to comment.