map vs comprehension

This commit is contained in:
Bogumił Kamiński 2022-05-28 21:22:45 +02:00
parent b679d06b54
commit 75c1d183cb
1 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,10 @@ end
[mean(col) for col in eachcol(aq)]
[std(col) for col in eachcol(aq)]
x = (-2, -1, 0, 1, 2)
[abs(v) for v in x]
map(abs, x)
# Code for section 4.1.3
[mean(aq[:, j]) for j in axes(aq, 2)]