Skip to content

Commit 1c2b65f

Browse files
committed
Add exercise assignment for Array slicing
1 parent 701a0c9 commit 1c2b65f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

numpy/array-slicing/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Array slicing
2+
3+
First, create a 4x4 array with arbitrary values, then
4+
5+
1. Extract every element from the second row.
6+
2. Extract every element from the third column.
7+
3. Assign a value of 0.21 to upper left 2x2 subarray.
8+
9+
Next, create a 8x8 array with checkerboard pattern, i.e. alternating zeros
10+
and ones:
11+
12+
1 0 1 ...
13+
0 1 0 ...
14+
 1 0 1 ...
15+
  ...

0 commit comments

Comments
 (0)