Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 441:552189707fbe feature/lazy_identity
Add convenience constructor
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 19 Oct 2020 21:23:12 +0200 |
parents | 00c317c9ccfb |
children | e70e47fbfa7c |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Mon Oct 19 21:12:15 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Mon Oct 19 21:23:12 2020 +0200 @@ -161,6 +161,7 @@ export IdentityMapping 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) range_size(tmi::IdentityMapping) = tmi.size domain_size(tmi::IdentityMapping) = tmi.size