Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Sep 17, 2024
1 parent 066c94e commit a8b4321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-model-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ test_that("can compute multiple gradients", {
m <- monty_example("banana")
expect_equal(monty_model_gradient(m, c(0, 0)), c(0, 0))
expect_equal(monty_model_gradient(m, c(0, 0), named = TRUE),
c(a = 0, b = 0))
c(alpha = 0, beta = 0))

p <- cbind(c(0, 0), c(1, 0), c(0, 1))
expect_equal(monty_model_gradient(m, p),
rbind(c(0, -4, 4), c(0, 0, -9)))
expect_equal(monty_model_gradient(m, p, named = TRUE),
rbind(a = c(0, -4, 4), b = c(0, 0, -9)))
rbind(alpha = c(0, -4, 4), beta = c(0, 0, -9)))
})

0 comments on commit a8b4321

Please sign in to comment.