py_slice: Slice index in 'Python' arrays

View source: R/utils.R

py_sliceR Documentation

Slice index in 'Python' arrays

Description

Slice index in 'Python' arrays

Usage

py_slice(...)

Arguments

...

passing to slice ('Python')

Value

Index slice instance

Examples



if(interactive() && ants_available()) {

  x <- np_array(array(seq(20), c(4, 5)))

  # equivalent to x[::2]
  x[py_slice(NULL, NULL, 2L)]

}

rpyANTs documentation built on May 29, 2024, 10:40 a.m.