diff src/LazyTensors/lazy_tensor_operations.jl @ 1635:b62770cec7d0 update/julia_1.10.3

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 25 Jun 2024 15:32:19 +0200
parents df1856b0e2f0
children 164e26a6cf79 8b64df6cadba
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Sat May 25 16:02:55 2024 -0700
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Tue Jun 25 15:32:19 2024 +0200
@@ -121,6 +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) = (-one(eltype(tm)))*tm
 
 """
     InflatedTensor{T,R,D} <: LazyTensor{T,R,D}