Week 2 • Thursday

Block 17: Aggregations & Statistics

Summarize arrays with aggregate functions along any axis.

Concepts

Code Examples

See exercise below.

Exercise

For a 4×5 random matrix: compute max per row, min per column, overall std. Given daily temperatures for 4 weeks (4×7), compute weekly averages.

Homework

Explain the difference between axis=0 and axis=1 with a diagram or example.