Mercurial > repos > public > sbplib_julia
diff test/testLazyTensors.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/test/testLazyTensors.jl Mon Oct 19 21:23:12 2020 +0200 +++ b/test/testLazyTensors.jl Mon Oct 19 21:41:34 2020 +0200 @@ -287,6 +287,8 @@ @test IdentityMapping{Float64}((4,5)) isa TensorMapping{T,2,2} where T @test IdentityMapping{Float64}((4,5)) == IdentityMapping{Float64}(4,5) + @test IdentityMapping(3,2) isa IdentityMapping{Float64,2} + for sz ∈ [(4,5),(3,),(5,6,4)] I = IdentityMapping{Float64}(sz) v = rand(sz...)