Nothing
library(testthat)
test_that("test-reshape_python.R", {
# [1 2
# 3 4] ->
# [[1 2
# 3 4]]
matrix <- matrix(c(1, 2, 3, 4), nrow = 2, byrow = TRUE)
trans_prior <- reshape_python(matrix, dim = c(1, 2, 2))
expected_trans_prior <- array(c(1, 3, 2, 4), dim = c(1, 2, 2))
expect_equal(trans_prior, expected_trans_prior)
# [1 2 3 4] ->
# [[1 2
# 3 4]]
trans_prior <- reshape_python(c(1, 2, 3, 4), dim = c(1, 2, 2))
expected_trans_prior <- array(c(1, 3, 2, 4), dim = c(1, 2, 2))
expect_equal(trans_prior, expected_trans_prior)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.