Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 351 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 351 Bytes

Array slicing

First, create a 4x4 array with arbitrary values, then

  1. Extract every element from the second row.
  2. Extract every element from the third column.
  3. Assign a value of 0.21 to upper left 2x2 subarray.

Next, create a 8x8 array with checkerboard pattern, i.e. alternating zeros and ones:

1 0 1 ...
0 1 0 ...
1 0 1 ...
 ...