Wednesday, 17 January 2024

How much do you know about NumPy library?

 



What is NumPy?

a) A programming language

b) A machine learning library

c) A numerical computing library in Python

d) A deep learning framework


Question 2:

Which of the following is the primary purpose of NumPy?

a) Web development

b) Data manipulation and analysis

c) Game development

d) Network programming


Question 3:

What does the term "NumPy" stand for?

a) Numerical Python

b) Nonlinear Python

c) Neural Python

d) Numeral Python


Question 4:

Which of the following is the correct way to import NumPy in Python?

a) import np

b) import numpy as np

c) from numpy import *

d) include numpy


Question 5:

What is the core data structure in NumPy for representing arrays?

a) Lists

b) Tuples

c) Arrays

d) Sets


Question 6:

Which NumPy function is used to create an array with a range of values?

a) numpy.linspace()

b) numpy.range()

c) numpy.aranges()

d) numpy.arange()


Question 7:

What is the result of the following NumPy expression: numpy.zeros(5)?

a) An array with five elements, all set to 1

b) An array with five elements, all set to 0

c) An empty array

d) An array with five elements, all set to 5


Question 8:

Which NumPy function is used to find the mean of an array?

a) numpy.mean()

b) numpy.average()

c) numpy.median()

d) numpy.mean_value()


Question 9:

In NumPy, what does the function numpy.random.rand() do?

a) Generates random integers

b) Generates random floats in the half-open interval [0.0, 1.0)

c) Computes the standard deviation of an array

d) Creates an array with a specified shape and all elements initialized to the same value


Question 10:

What does the term "broadcasting" mean in the context of NumPy?

a) Sending data over a network

b) Extending the dimensions of an array

c) Performing element-wise operations on arrays of different shapes and sizes

d) Converting data types in an array


Question 11:

Which NumPy function is used to perform element-wise multiplication of two arrays?

a) numpy.multiply()

b) numpy.dot()

c) numpy.cross()

d) numpy.product()


Question 12:

How can you reshape a NumPy array with dimensions (4, 5) into a new array with dimensions (2, 10)?

a) array.reshape((2, 10))

b) numpy.resize(array, (2, 10))

c) numpy.reshape(array, (2, 10))

d) array.resize((2, 10))


Question 13:

What is the purpose of the NumPy function numpy.linalg.inv()?

a) Computes the determinant of a matrix

b) Finds the eigenvalues of a matrix

c) Computes the inverse of a matrix

d) Calculates the singular value decomposition of a matrix


Question 14:

Which NumPy function is used to concatenate two or more arrays along a specified axis?

a) numpy.append()

b) numpy.concatenate()

c) numpy.concat()

d) numpy.merge()


Question 15:

How can you find the index of the maximum value in a NumPy array?

a) numpy.max_index()

b) numpy.argmax()

c) numpy.index_max()

d) numpy.maximum_index()


Question 16:

What is the purpose of the NumPy function numpy.fft.fft()?

a) Finds the fast file transfer of an array

b) Computes the fast Fourier transform of an array

c) Calculates the flip-flop transform of an array

d) Performs the fuzzy frequency transformation of an array


Question 17:

Which NumPy function is used to calculate the dot product of two arrays?

a) numpy.dot()

b) numpy.multiply()

c) numpy.cross()

d) numpy.product()


Question 18:

In NumPy, what does the function numpy.where() do?

a) Filters elements of an array based on a condition

b) Finds the index of a specified element in an array

c) Transposes the elements of an array

d) Sorts the elements of an array


Question 19:

What is the purpose of the NumPy function numpy.save()?

a) Saves an array to a text file

b) Saves an array to a binary file in NumPy's .npy format

c) Saves an array to a CSV file

d) Saves an array to an Excel file


Question 20:

How can you find the unique elements in a NumPy array?

a) numpy.unique()

b) numpy.distinct()

c) numpy.uniq()

d) numpy.elements()


Question 1: c) A numerical computing library in Python

Question 2: b) Data manipulation and analysis

Question 3: a) Numerical Python

Question 4: b) import numpy as np

Question 5: c) Arrays

Question 6: d) numpy.arange()

Question 7: b) An array with five elements, all set to 0

Question 8: a) numpy.mean()

Question 9: b) Generates random floats in the half-open interval [0.0, 1.0)

Question 10: c) Performing element-wise operations on arrays of different shapes and sizes

Question 11: a) numpy.multiply()

Question 12: a) array.reshape((2, 10))

Question 13: c) Computes the inverse of a matrix

Question 14: b) numpy.concatenate()

Question 15: b) numpy.argmax()

Question 16: b) Computes the fast Fourier transform of an array

Question 17: a) numpy.dot()

Question 18: a) Filters elements of an array based on a condition

Question 19: b) Saves an array to a binary file in NumPy's .npy format

Question 20: a) numpy.unique()





0 Comments:

Post a Comment

Popular Posts

Categories

AI (33) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (146) C (77) C# (12) C++ (82) Course (67) Coursera (198) Cybersecurity (24) data management (11) Data Science (106) Data Strucures (8) Deep Learning (13) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (21) Hadoop (3) HTML&CSS (47) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Nvidia (1) Pandas (3) PHP (20) Projects (29) Python (892) Python Coding Challenge (285) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (42) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses