Skip to content

Latest commit

 

History

History
 
 

array-slicing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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 ...
 ...