From 678b9a96a833f05d6f807b244f6afe016f48cfed Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Sun, 8 Oct 2023 17:17:08 +0200 Subject: [PATCH] fix case of unknown extents --- src/arrays.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arrays.jl b/src/arrays.jl index bfd06b46f..3d71a62a3 100644 --- a/src/arrays.jl +++ b/src/arrays.jl @@ -215,7 +215,9 @@ function make_shape(output_idx, expr, ranges=Dict()) end mi = matches[i] @assert !isempty(mi) - return Base.OneTo(length(get_extents(mi))) + ext = get_extents(mi) + ext isa Unknown && return Unknown() + return Base.OneTo(length(ext)) elseif i isa Integer return Base.OneTo(1) end