CARVIEW |
Numpy Operations
Numpy basic operations
Question 1
What is a NumPy array mainly used for?
Text editing
Drawing images
Storing and processing numeric data
Managing websites
Question 2
Which function is used to create a NumPy array?
array()
make_array()
np.array()
new.array()
Question 3
Which of these is a valid 2D NumPy array?
np.array([[1, 2], [3, 4]])
np.array([1, 2, 3])
np.array(5)
np.array([‘a’, ‘b’])
Question 4
What does ndarray.shape
return?
Number of elements
Size of array
Dimensions of the array (rows and columns)
Name of array
Question 5
How do you find the total number of elements in an array?
arr.ndim
arr.count()
arr.size
arr.length()
Question 6
Which method returns the number of dimensions of an array?
ndarray.type()
ndarray.ndim
ndarray.shape()
ndarray.data
Question 8
In a 2D array what does arr[1][0]
give?
First element of second row
Second element of second row
First element of first row
Last element of last row
There are 14 questions to complete.