forked from JuliaLang/Compat.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request JuliaLang#109 from JuliaStats/testna
Speed up anyna, allna. Reinstate NAs tests.
- Loading branch information
Showing
16 changed files
with
369 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
module TestAbstractArray | ||
using Base.Test | ||
using DataArrays | ||
using Base.Test | ||
using DataArrays | ||
|
||
unsorted_dv = @data [2, 1, NA] | ||
unsorted_dv = @data [2, 1, NA] | ||
|
||
# TODO: Make this work | ||
# tiedrank(dv) | ||
# TODO: Make this work | ||
# tiedrank(dv) | ||
|
||
@assert first(unsorted_dv) == 2 | ||
@assert isna(last(unsorted_dv)) | ||
@assert first(unsorted_dv) == 2 | ||
@assert isna(last(unsorted_dv)) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
module TestBooleans | ||
using Base.Test | ||
using DataArrays | ||
using Base.Test | ||
using DataArrays | ||
|
||
@assert NA | true == true | ||
@assert isna(NA | false) | ||
@assert isna(NA | NA) | ||
@assert true | NA == true | ||
@assert isna(false | NA) | ||
@assert NA | true == true | ||
@assert isna(NA | false) | ||
@assert isna(NA | NA) | ||
@assert true | NA == true | ||
@assert isna(false | NA) | ||
|
||
@assert isna(NA & true) | ||
@assert NA & false == false | ||
@assert isna(NA & NA) | ||
@assert isna(true & NA) | ||
@assert false & NA == false | ||
@assert isna(NA & true) | ||
@assert NA & false == false | ||
@assert isna(NA & NA) | ||
@assert isna(true & NA) | ||
@assert false & NA == false | ||
|
||
@assert any((@data [1, 2, NA]) .== 1) == true | ||
@assert any((@data [NA, 1, 2]) .== 1) == true | ||
@assert isna(any((@data [1, 2, NA]) .== 3)) | ||
@assert any((@data [1, 2, 3] ).== 4) == false | ||
@assert any((@data [1, 2, NA]) .== 1) == true | ||
@assert any((@data [NA, 1, 2]) .== 1) == true | ||
@assert isna(any((@data [1, 2, NA]) .== 3)) | ||
@assert any((@data [1, 2, 3] ).== 4) == false | ||
|
||
@assert isna(all((@data [1, 1, NA]) .== 1)) | ||
@assert isna(all((@data [NA, 1, 1]) .== 1)) | ||
@assert all((@data [1, 1, 1]) .== 1) == true | ||
@assert all((@data [1, 2, 1]) .== 1) == false | ||
@assert isna(all((@data [1, 1, NA]) .== 1)) | ||
@assert isna(all((@data [NA, 1, 1]) .== 1)) | ||
@assert all((@data [1, 1, 1]) .== 1) == true | ||
@assert all((@data [1, 2, 1]) .== 1) == false | ||
end |
Oops, something went wrong.