diff src/LazyTensors/lazy_tensor_operations.jl @ 1605:1388149b54ad feature/boundary_conditions

REVIEW: Suggestions for minor fixes
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 08 Jun 2024 23:43:49 +0200
parents d68d02dd882f
children df1856b0e2f0
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Sat Jun 08 22:51:31 2024 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Sat Jun 08 23:43:49 2024 +0200
@@ -121,7 +121,7 @@
 
 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
-Base.:-(tm::LazyTensor{T}) where T = (-one(T))*tm
+Base.:-(tm::LazyTensor) where T = (-one(eltype(tm)))*tm
 
 """
     InflatedTensor{T,R,D} <: LazyTensor{T,R,D}