diff --git a/drjit/router.py b/drjit/router.py index 5004e405a..63a941a7d 100644 --- a/drjit/router.py +++ b/drjit/router.py @@ -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)