Description Usage Arguments Value
mapnd() applies a function along a specific axis/dimension of x. However, if a corresponding column function is available, using mapnd_col() can be more efficient e.g. use mapnd_col(x, colMeans) instead of mapnd(x, mean). For convenience, you can also call mapnd() by supplying a function name, e.g. mapnd(x, "mean"). In this case, mapnd will first lookup any corresponding column vectorised function by calling find_colFunc() and if a colFunc is found, mapnd_col will be used instead for better performance.
1 2 3 |
x |
an nd-array. |
func |
a function to map. |
along |
the axis to map the function to (dims to collapse). |
pack_args |
whether to pack arguments for func. |
... |
other arguments passed to func. |
colFunc |
a column function. |
func_name |
a optimised function name. |
an array (dimension depending on returned dimension of func)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.