Skip to content

Commit 24d1084

Browse files
committed
Fix readme build from privious pr
1 parent 4377b23 commit 24d1084

7 files changed

Lines changed: 32 additions & 605 deletions

README.md

Lines changed: 18 additions & 591 deletions
Large diffs are not rendered by default.
-22.1 KB
Loading
-25.8 KB
Loading
-19.4 KB
Loading
-22.3 KB
Loading
-44.1 KB
Loading

tests/testthat/test-matrix.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,24 @@ test_that("1x1 matrix preserves matrix result with length-1 vector", {
141141
})
142142

143143
test_that("1x1 matrix with length-n vector yields a vector", {
144-
fn <- function(vec, mat_1_1) {
145-
declare(
146-
type(vec = double(n)),
147-
type(mat_1_1 = double(1, 1))
148-
)
149-
a <- vec + mat_1_1
150-
b <- mat_1_1 + vec
151-
out <- list(a = a, b = b)
152-
out
153-
}
154-
155-
## Note: base R emits a warning:
144+
fn <- function(vec, mat_1_1) {
145+
declare(
146+
type(vec = double(n)),
147+
type(mat_1_1 = double(1, 1))
148+
)
149+
a <- vec + mat_1_1
150+
b <- mat_1_1 + vec
151+
out <- list(a = a, b = b)
152+
out
153+
}
154+
155+
## Note: base R emits a warning:
156156
## Recycling array of length 1 in vector-array arithmetic is deprecated
157-
## suppressWarnings is used to pass test as this path may arrise in code
157+
## suppressWarnings is used to pass test as this path may arrise in code
158158
## e.g crossprod(1:4) or other matrix operation that gives 1 by 1 matrix
159159
suppressWarnings(expect_quick_identical(
160160
fn,
161-
list(c(1,2,3), matrix(1, nrow = 1L, ncol = 1L))
161+
list(c(1, 2, 3), matrix(1, nrow = 1L, ncol = 1L))
162162
))
163163
})
164164

0 commit comments

Comments
 (0)