all_dims | R Documentation |
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
).
all_dims()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.