Data Fundamentals (H) - Week 01 Quiz
1. An array has shape (13, 5). What would we call it?
A vector
An ellipsis
A vectrix
A matrix
A tensor
2. Vectorised operations:
Do one operation on one number at a time
Do operations without a defined order
Do the same operation on many data items at once
Do not work on numbers
Do many operations to the same data items at once
3. Arrays have fixed:
elements
legs
shape and dtype
sums
variable names
4. An (8,4) array has:
8 rows, 4 columns
2 frames, 4 rows, 4 columns
4 legs, 8 arms
4 rows, 8 columns
8 rows, 1 column, 1 depth
5.
x[::2, 1:5]
is a slice which indexes:
Every row, columns 1-5
Every row, columns 0-6
Every column, rows 1-6
Every other row, columns 1-5
Every row, all columns
6.
np.arange(1,5)
produces the array:
[1,1,1,1,1]
[0,1,2,3,4,5]
[[1], [1,2], [1,2,3], [1,2,3,4], [1,2,3,4,5]]
[1,2,3,4]
[0,1,2,3,4]
Submit Quiz