Skip to content

Commit

Permalink
check matrix package can report its version
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmelville committed Apr 20, 2024
1 parent e80aa07 commit af96d1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test_normlaplacian.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ test_that("normalized laplacian", {
expect_equal(abs(res), abs_expected_norm_lap, tolerance = 0.2)

# 115: ensure irlba code path gets tested if we can avoid Matrix ABI issue
if (Matrix::Matrix.Version()$package >= "1.6.3") {
if (exists("Matrix.Version", envir = asNamespace("Matrix")) &&
Matrix::Matrix.Version()$package >= "1.6.3") {
res <- irlba_tsvd_normalized_laplacian_init(sparse_m)
expect_equal(abs(res), abs_expected_norm_lap, tolerance = 0.2)

Expand Down

0 comments on commit af96d1d

Please sign in to comment.