Mercurial > repos > public > sbplib_julia
diff LazyTensors/src/lazy_operations.jl @ 257:d4cd4882ee9f boundary_conditions
Improve error messages when multiblying with TensorMappings and add some tests for TensorOperators
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 28 Jun 2019 14:10:35 +0200 |
parents | 1c6afdcfd657 |
children | b577b5f64530 |
line wrap: on
line diff
--- a/LazyTensors/src/lazy_operations.jl Fri Jun 28 14:08:30 2019 +0200 +++ b/LazyTensors/src/lazy_operations.jl Fri Jun 28 14:10:35 2019 +0200 @@ -32,7 +32,7 @@ # TODO: What else is needed to implement the AbstractArray interface? # # We need the associativity to be a→b→c = a→(b→c), which is the case for '→' -Base.:*(args::Union{TensorMapping{T}, AbstractArray{T}}...) where T = foldr(*,args) +Base.:*(a::TensorMapping{T,R,D}, b::TensorMapping{T,D,K}, args::Union{TensorMapping{T}, AbstractArray{T}}...) where {T,R,D,K} = foldr(*,(a,b,args...)) # # Should we overload some other infix binary operator? # →(tm::TensorMapping{T,R,D}, o::AbstractArray{T,D}) where {T,R,D} = LazyTensorMappingApplication(tm,o) # TODO: We need to be really careful about good error messages.