Python Programming - Arrays
Exercise : Arrays - General Questions
- Arrays - General Questions
21.
What is the purpose of the
numpy.concatenate()
function in NumPy?
Answer: Option
Explanation:
The
numpy.concatenate()
function in NumPy is used to concatenate two arrays along a specified axis.
22.
Which NumPy function is used to find the unique elements of an array?
Answer: Option
Explanation:
The
numpy.unique()
function is used to find the unique elements of an array.
23.
What does the function
numpy.zeros_like(arr)
do in NumPy?
Answer: Option
Explanation:
The
numpy.zeros_like()
function creates a new array with zeros of the same shape as the input array arr.
24.
How do you stack two NumPy arrays vertically?
Answer: Option
Explanation:
The
np.vstack()
function in NumPy is used to stack arrays vertically.
25.
What does the
numpy.transpose()
function do?
Answer: Option
Explanation:
The
numpy.transpose()
function swaps the axes of the array.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers