tests/testthat/test-dimname_list.R

context("dimname-list")

test_that("dimname can be created", {
  x <- torch_dimname("hello")
  expect_output(print(x))
})

test_that("dimname lists can be created", {
  x <- torch_dimname_list(c("hello", "world"))
  expect_output(print(x))

  x <- torch_dimname_list(letters)
  expect_output(print(x))
})

Try the torch package in your browser

Any scripts or data that you put into this service are public.

torch documentation built on May 29, 2024, 9:54 a.m.