• Data Science MCQ Topics

• Data Science Reference

• Other Reference

# Python NumPy MCQ Questions And Answers

This section focuses on "Python NumPy" for Data Science. These Python NumPy Multiple Choice Questions (MCQ) should be practiced to improve the Data Science skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.

1. NumPY stands for?

A. Numbering Python
B. Number In Python
C. Numerical Python
D. None Of the above

2. NumPy is often used along with packages like?

A. Node.js
B. Matplotlib
C. SciPy
D. Both B and C

3. The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

4. What will be output for the following code?

```import numpy as np

a = np.array([1,2,3])

print a```

A. [[1, 2, 3]]
B. 
C. [1, 2, 3]
D. Error

5. What will be output for the following code?

```import numpy as np

a = np.array([1, 2, 3], dtype = complex)

print a```

A. [[ 1.+0.j, 2.+0.j, 3.+0.j]]
B. [ 1.+0.j]
C. Error
D. [ 1.+0.j, 2.+0.j, 3.+0.j]

6. Which of the following statement is false?

A. ndarray is also known as the axis array.
B. ndarray.dataitemSize is the buffer containing the actual elements of the array.
C. NumPy main object is the homogeneous multidimensional array
D. In Numpy, dimensions are called axes

7. If a dimension is given as ____ in a reshaping operation, the other dimensions are automatically calculated.

A. Zero
B. One
C. Negative one
D. Infinite

8. Which of the following sets the size of the buffer used in ufuncs?

A. bufsize(size)
B. setsize(size)
C. setbufsize(size)
D. size(size)

9. What will be output for the following code?

```import numpy as np

dt = dt = np.dtype('i4')

print dt```

A. int32
B. int64
C. int128
D. int16

10. Each built-in data type has a character code that uniquely identifies it.What is meaning of code "M"?

A. timedelta
B. datetime
C. objects
D. Unicode