Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 442:e70e47fbfa7c feature/lazy_identity
Add another convenience constructor
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 19 Oct 2020 21:41:34 +0200 |
parents | 552189707fbe |
children | ac6d22570a08 |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Mon Oct 19 21:23:12 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Mon Oct 19 21:41:34 2020 +0200 @@ -162,6 +162,7 @@ IdentityMapping{T}(size::NTuple{D,Int}) where {T,D} = IdentityMapping{T,D}(size) IdentityMapping{T}(size::Vararg{Int,D}) where {T,D} = IdentityMapping{T,D}(size) +IdentityMapping(size::Vararg{Int,D}) where D = IdentityMapping{Float64,D}(size) range_size(tmi::IdentityMapping) = tmi.size domain_size(tmi::IdentityMapping) = tmi.size