Skip to content

Commit

Permalink
Ensure inputs to stack operation are aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 25, 2017
1 parent fa45728 commit cf55ddd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions holoviews/operation/datashader.py
Expand Up @@ -618,6 +618,11 @@ def _process(self, overlay, key=None):
coords = {kd.name: rgb.dimension_values(kd, False)
for kd in rgb.kdims}
imgs.append(tf.Image(self.uint8_to_uint32(rgb), coords=coords, dims=dims))
try:
imgs = xr.align(*imgs, join='exact')
except ValueError:
raise ValueError('RGB inputs to stack operation could not be aligned, '
'ensure they share the same grid sampling.')
stacked = tf.stack(*imgs, how=self.p.compositor)
arr = shade.uint32_to_uint8(stacked.data)[::-1]
data = (coords[dims[1]], coords[dims[0]], arr[:, :, 0],
Expand Down

0 comments on commit cf55ddd

Please sign in to comment.