Skip to content

Commit

Permalink
Fix dr.unravel for tensor input
Browse files Browse the repository at this point in the history
Speierers committed Sep 21, 2022
1 parent 1230f10 commit 578b0dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drjit/router.py
Original file line number Diff line number Diff line change
@@ -1112,6 +1112,8 @@ def unravel(dtype, array, order='F'):
t = t.Value
index_type = _dr.uint32_array_t(t)

array = array if not _dr.is_tensor_v(array) else array.array

if len(array) % size != 0:
raise Exception('unravel(): input array length must be '
'divisible by %i!' % size)

0 comments on commit 578b0dd

Please sign in to comment.