Mercurial > repos > public > sbplib_julia
comparison test/LazyTensors/lazy_tensor_operations_test.jl @ 1024:5be17f647018 refactor/sbpoperators/inflation
Add some more tests
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 21 Mar 2022 10:04:15 +0100 |
parents | 52f07c77299d |
children | f857057e61e6 |
comparison
equal
deleted
inserted
replaced
1023:52f07c77299d | 1024:5be17f647018 |
---|---|
363 I = LazyTensors.inflate(IdentityTensor(),(3,4,5,6), 2) | 363 I = LazyTensors.inflate(IdentityTensor(),(3,4,5,6), 2) |
364 @test I isa LazyTensor{Float64, 3,3} | 364 @test I isa LazyTensor{Float64, 3,3} |
365 @test range_size(I) == (3,5,6) | 365 @test range_size(I) == (3,5,6) |
366 @test domain_size(I) == (3,5,6) | 366 @test domain_size(I) == (3,5,6) |
367 | 367 |
368 # TODO: More tests | 368 @test LazyTensors.inflate(ScalingTensor(1., (4,)),(3,4,5,6), 1) == InflatedLazyTensor(IdentityTensor{Float64}(),ScalingTensor(1., (4,)),IdentityTensor(4,5,6)) |
369 | 369 @test LazyTensors.inflate(ScalingTensor(2., (1,)),(3,4,5,6), 2) == InflatedLazyTensor(IdentityTensor(3),ScalingTensor(2., (1,)),IdentityTensor(5,6)) |
370 # Check that the dir is inbounds | 370 @test LazyTensors.inflate(ScalingTensor(3., (6,)),(3,4,5,6), 4) == InflatedLazyTensor(IdentityTensor(3,4,5),ScalingTensor(3., (6,)),IdentityTensor{Float64}()) |
371 | 371 |
372 # tm = ScalingOperator(2., (4,)) | 372 @test_throws BoundsError LazyTensors.inflate(ScalingTensor(1., (4,)),(3,4,5,6), 0) |
373 end | 373 @test_throws BoundsError LazyTensors.inflate(ScalingTensor(1., (4,)),(3,4,5,6), 5) |
374 end |