Skip to content

Commit

Permalink
canonicalize matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
schochastics committed Jan 25, 2025
1 parent 64884ce commit ada8e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ test_that("as_adjacency_matrix() works -- dense + weights", {
mat[lower.tri(mat)] <- 1:10
mat <- mat + t(mat)
A <- as_adjacency_matrix(g, attr = "weight", sparse = FALSE)
expect_equal(A, mat)
expect_equal(canonicalize_matrix(A), mat)
})

test_that("as_biadjacency_matrix() works -- dense + weights", {
Expand All @@ -295,5 +295,5 @@ test_that("as_biadjacency_matrix() works -- dense + weights", {
ncol = 2L,
dimnames = list(c("1", "3", "5", "6"), c("2", "4"))
)
expect_equal(A, mat)
expect_equal(canonicalize_matrix(A), mat)
})

0 comments on commit ada8e5f

Please sign in to comment.