Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

all_dims

All dims


Description

This function returns an object that can be used when subsetting tensors with [. If you are familiar with python,, this is equivalent to the python Ellipsis ..., (not to be confused with ... in R).

Usage

all_dims()

Examples

## Not run: 
# in python, if x is a numpy array or tensorflow tensor
x[..., i]
# the ellipsis means "expand to match number of dimension of x".
# to translate the above python expression to R, write:
x[all_dims(), i]

## End(Not run)

tensorflow

R Interface to 'TensorFlow'

v2.4.0
Apache License 2.0
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], RStudio [cph, fnd], Yuan Tang [aut, cph] (<https://orcid.org/0000-0001-5243-233X>), Dirk Eddelbuettel [ctb, cph], Nick Golding [ctb, cph], Tomasz Kalinowski [ctb, cph], Google Inc. [ctb, cph] (Examples and Tutorials)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.