Skip to content

Commit

Permalink
Force dtype of prod in _ravel_shape_indices (#57)
Browse files Browse the repository at this point in the history
Force dtype of `prod` in `_ravel_shape_indices`
  • Loading branch information
jakirkham committed Sep 3, 2018
1 parent aab8434 commit 8db18e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dask_image/ndmeasure/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ def _ravel_shape_indices(dimensions, dtype=int, chunks=None):

indices = sum([
dask.array.arange(
0, numpy.prod(dimensions[i:]), numpy.prod(dimensions[i + 1:]),
dtype=dtype, chunks=c
0,
numpy.prod(dimensions[i:], dtype=dtype),
numpy.prod(dimensions[i + 1:], dtype=dtype),
dtype=dtype,
chunks=c
)[i * (None,) + (slice(None),) + (len(dimensions) - i - 1) * (None,)]
for i, c in enumerate(chunks)
])
Expand Down

0 comments on commit 8db18e9

Please sign in to comment.