What function is used to create an array in NumPy?

NumPy and Pandas Quiz

Quiz
•
Other
•
University
•
Easy
Liana Nafisa Saftari
Used 4+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
np.list()
np.array()
np.create()
np.make()
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
How can you create a 1D array with values from 0 to 9?
np.arange(10)
np.linspace(0, 10, 1)
np.zeros(10)
np.ones(10)
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What does np.zeros((3, 3)) do?
Creates a 1D array of zeros
Creates a 3x3 matrix of ones
Creates a 3x3 matrix of zeros
Returns an error
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the default datatype for NumPy arrays?
int
float
bool
str
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will np.array([1, 2, 3]) + np.array([4, 5, 6]) return?
[5, 7, 9]
[14, 25, 36]
[[1, 4], [2, 5], [3, 6]]
Error
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What does np.mean() compute?
Median
Mean
Mode
Variance
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
How do you reshape a 1D array arr of size 12 into a 3x4 array?
arr.reshape(3, 4)
arr.reshape(4, 3)
arr.resize(3, 4)
arr.reshape(2, 6)
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Pierwsza pomoc

Quiz
•
University
20 questions
POST TEST MODULE 7

Quiz
•
University
15 questions
C Quiz

Quiz
•
University
17 questions
Slot4_Ôn tập

Quiz
•
University
15 questions
Sorting Quiz

Quiz
•
University - Professi...
21 questions
Networking and Switching Quiz chapter 2

Quiz
•
University
15 questions
Storage CompTIA 20200415

Quiz
•
University
20 questions
Kecermatan 1

Quiz
•
12th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade