comparison src/LazyTensors/lazy_tensor_operations.jl @ 419:2958b4ebd565 feature/tensor_composition

Change error message to fit guidelines
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 18 Oct 2020 21:50:03 +0200
parents 264af2bb646f
children 7327a3e41df0 cffdac9c612d
comparison
equal deleted inserted replaced
418:264af2bb646f 419:2958b4ebd565
83 t1::TM1 83 t1::TM1
84 t2::TM2 84 t2::TM2
85 85
86 @inline function TensorMappingComposition(t1::TensorMapping{T,R,K}, t2::TensorMapping{T,K,D}) where {T,R,K,D} 86 @inline function TensorMappingComposition(t1::TensorMapping{T,R,K}, t2::TensorMapping{T,K,D}) where {T,R,K,D}
87 @boundscheck if domain_size(t1) != range_size(t2) 87 @boundscheck if domain_size(t1) != range_size(t2)
88 throw(DimensionMismatch("The first argument has domain size $(domain_size(t1)) while the second has range size $(range_size(t2)) ")) 88 throw(DimensionMismatch("the first argument has domain size $(domain_size(t1)) while the second has range size $(range_size(t2)) "))
89 end 89 end
90 return new{T,R,K,D, typeof(t1), typeof(t2)}(t1,t2) 90 return new{T,R,K,D, typeof(t1), typeof(t2)}(t1,t2)
91 end 91 end
92 # Add check for matching sizes as a boundscheck 92 # Add check for matching sizes as a boundscheck
93 end 93 end