-
Notifications
You must be signed in to change notification settings - Fork 23
Infer outputtype by Base.return_types #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
17450eb
3d4cbc6
fbbee44
58791f7
b6a3348
9b2ef53
1317d32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,4 +60,17 @@ a, b, c = sample_arrays() | |
| xscalar = a .* 3 .+ 1 | ||
| @test all(xscalar[:] .== 4.0) | ||
| @test isa(a .+ b, YAXArray) | ||
| end | ||
|
|
||
| @testset "missing handling" begin | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we also test the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we could also test the promote_type.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this coming from an actual use case or is this good to have in case? |
||
| am = YAXArray([missing 1 ; 1 2]) | ||
| aeq = am .== am | ||
| @test eltype(aeq) == Union{Missing, Bool} | ||
| @test ismissing(aeq[1,1]) | ||
| @test aeq[1,2] | ||
| aeq2 = similar(aeq) | ||
| aeq2 .= am .== am | ||
| @test eltype(aeq2) == Union{Missing, Bool} | ||
| @test ismissing(aeq2[1,1]) | ||
| @test aeq2[2,2] | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applying
fhere is for a reason, isn't? e.g. this could determine if the output is just a number or anArray, anfthat reduces along a given dimension or not, likecumsum.not sure...