Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 1143:9275d95e2d90 refactor/grids
Merge with default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 19 Oct 2022 22:36:02 +0200 |
parents | 2e606d4c0ab1 |
children | 2278730f9cee 95464a1af340 1e8270c18edb b4ee47f2aafb 87576b0ca0e3 |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Wed Apr 27 10:25:53 2022 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Wed Oct 19 22:36:02 2022 +0200 @@ -98,7 +98,6 @@ apply_transpose(c.t2, c.t1'*v, I...) end - """ TensorComposition(tm, tmi::IdentityTensor) TensorComposition(tmi::IdentityTensor, tm) @@ -120,6 +119,8 @@ return tmi end +Base.:*(a::T, tm::LazyTensor{T}) where T = TensorComposition(ScalingTensor{T,range_dim(tm)}(a,range_size(tm)), tm) +Base.:*(tm::LazyTensor{T}, a::T) where T = a*tm """ InflatedTensor{T,R,D} <: LazyTensor{T,R,D}