@@ -1269,11 +1269,20 @@ expect_equal(cx_col_sums(x), colSums(x), info = "complex / colSums / keep NA / m
12691269expect_equal(cx_col_sums(x , TRUE ), colSums(x , TRUE ), info = " complex / colSums / rm NA / mixed input" )
12701270
12711271expect_equal(cx_row_means(x ), rowMeans(x ), info = " complex / rowMeans / keep NA / mixed input" )
1272- if (getRversion() < " 4.6.0" ) expect_equal(cx_row_means(x , TRUE ), rowMeans(x , TRUE ), info = " complex / rowMeans / rm NA / mixed input" ) # # TODO FIXME R-devel
1272+ if (getRversion() < " 4.6.0" ) {
1273+ expect_equal(cx_row_means(x , TRUE ), rowMeans(x , TRUE ), info = " complex / rowMeans / rm NA / mixed input" )
1274+ } else {
1275+ # # TODO FIXME R-devel has borked rowMeans / colMeans for complex matrices with NA values
1276+ expect_equal(cx_row_means(x , TRUE ), apply(x , 1 , mean , na.rm = TRUE ), info = " complex / rowMeans / rm NA / mixed input" )
1277+ }
12731278
12741279expect_equal(cx_col_means(x ), colMeans(x ), info = " complex / colMeans / keep NA / mixed input" )
1275- if (getRversion() < " 4.6.0" ) expect_equal(cx_col_means(x , TRUE ), colMeans(x , TRUE ), info = " complex / colMeans / rm NA / mixed input" ) # # TODO FIXME R-devel
1276-
1280+ if (getRversion() < " 4.6.0" ) {
1281+ expect_equal(cx_col_means(x , TRUE ), colMeans(x , TRUE ), info = " complex / colMeans / rm NA / mixed input" )
1282+ } else {
1283+ # # TODO FIXME R-devel has borked rowMeans / colMeans for complex matrices with NA values
1284+ expect_equal(cx_col_means(x , TRUE ), apply(x , 2 , mean , na.rm = TRUE ), info = " complex / rowMeans / rm NA / mixed input" )
1285+ }
12771286
12781287x [] <- NA_complex_
12791288
0 commit comments