Skip to content

Commit 0cef9d4

Browse files
committed
Add xmap tests
1 parent c570576 commit 0cef9d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/DAT/xmap.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
@test r.data == a2.data .+ reshape(a3.data,(4,1,5))
2121
end
2222

23+
@testitem "set outtype" begin
24+
using YAXArrays
25+
using DimensionalData
26+
using Statistics
27+
x,y,z = X(1:4), Y(1:5), Z(1:6)
28+
a1 = YAXArray((x,y,z), rand(UInt8, 4,5,6))
29+
r = xmap((xout, xin) -> xout .= mean(xin), a1 :X, output=XOutput(outtype=Float16))
30+
@test r.data == Float16.(mean(a1, dims=1))
31+
end
2332

2433
#=
2534
These should be reenabled once we decided what keyword arguments xmap gets.

0 commit comments

Comments
 (0)