Skip to content

Commit bcbbd33

Browse files
committed
Fix DiagonalTensorMap error message
1 parent 7490b9d commit bcbbd33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tensors/diagonal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function DiagonalTensorMap{T}(::UndefInitializer, V::TensorMapSpace) where {T}
4444
end
4545
function DiagonalTensorMap{T}(::UndefInitializer, V::ProductSpace) where {T}
4646
length(V) == 1 ||
47-
throw(DimensionMismatch("length(V) = $(length(V)) is not compatible with the space $V"))
47+
throw(DimensionMismatch("DiagonalTensorMap requires `numin(d) == numout(d) == 1`"))
4848
return DiagonalTensorMap{T}(undef, only(V))
4949
end
5050
function DiagonalTensorMap{T}(::UndefInitializer, V::S) where {T,S<:IndexSpace}

0 commit comments

Comments
 (0)