Skip to content

Commit 92cceb0

Browse files
DimensionMismatch: Mention mismatched elements in addition to shape (JuliaLang#58091)
In response to JuliaLang#58047 Co-authored-by: Monica Kumaran <monicakumaran29@gmail.com>
1 parent 1570bed commit 92cceb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/reshapedarray.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function _reshape(parent::AbstractArray, dims::Dims)
225225
end
226226

227227
@noinline function _throw_dmrs(n, str, dims)
228-
throw(DimensionMismatch("parent has $n elements, which is incompatible with $str $dims"))
228+
throw(DimensionMismatch("parent has $n elements, which is incompatible with $str $dims ($(prod(dims)) elements)"))
229229
end
230230

231231
# Reshaping a ReshapedArray

0 commit comments

Comments
 (0)