Skip to content

Commit 4634ede

Browse files
author
Felix Cremer
authored
Remove mapslices and mention dropdims in docs (#558)
1 parent 7ab2a92 commit 4634ede

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/src/UserGuide/compute.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ Reduce the time dimension by calculating the average value of all points in time
8686
import Statistics: mean
8787
mapslices(mean, a, dims="time")
8888
````
89-
There is no time dimension left, because there is only one value left after averaging all time steps.
89+
90+
The time dimension has only a single value indicating the time interval that was used for the average. To remove this singleton dimension you can use `dropdims`.
91+
9092
We can also calculate spatial means resulting in one value per time step:
9193

9294
````@example compute

0 commit comments

Comments
 (0)