Skip to content

Commit

Permalink
fixing dtypes of chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Feb 13, 2024
1 parent bbabf64 commit 524cca2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/neuroglancer/write_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ def __init__(
) + _get_dtype_for_properties(self.properties)

# if chunk_size is an integer, then make it a sequence
if isinstance(experimental_chunk_size, numbers.Integral):
if isinstance(experimental_chunk_size, numbers.Real):
self.chunk_size = np.full(
shape=(self.rank,), fill_value=experimental_chunk_size, dtype=np.int32
shape=(self.rank,), fill_value=experimental_chunk_size, dtype=np.float64
)
else:
chunk_size = cast(Sequence[int], experimental_chunk_size)
chunk_size = cast(Sequence[float], experimental_chunk_size)
if len(chunk_size) != self.rank:
raise ValueError(
f"Expected experimental_chunk_size to have length {self.rank}, but received: {chunk_size}"
Expand Down

0 comments on commit 524cca2

Please sign in to comment.